
Streamlined Dockerfiles with clearer ENV variables and build args. Switched backend database from MySQL to PostgreSQL, updated configurations accordingly, and added robust Docker Compose services for better orchestration, including health checks and persistent storage.
27 lines
741 B
TypeScript
27 lines
741 B
TypeScript
import { defineConfig, loadEnv } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, process.cwd(), '');
|
|
|
|
console.log(`Active mode: ${mode}`);
|
|
console.log('Environment variable loaded:', env);
|
|
|
|
return {
|
|
plugins: [react()],
|
|
server: {
|
|
https: {
|
|
key: env.VITE_SSL_KEY_PATH,
|
|
cert: env.VITE_SSL_CERT_PATH,
|
|
},
|
|
host: '0.0.0.0',
|
|
port: 3000,
|
|
hmr: {
|
|
clientPort: 3000,
|
|
protocol: 'wss', // explicitly HTTPS Manager explicitly clearly make wss:// clearly listened clearly explicitly.
|
|
host: 'mx-aare-test.psi.ch' // explicitly your browser hostname explicitly clearly explicitly
|
|
},
|
|
|
|
},
|
|
};
|
|
}); |