Compare commits

...

3 commits

Author SHA1 Message Date
Eddi3_As
d9480e2d14 fichier manquant 2025-03-14 00:54:14 -04:00
Eddi3_As
ab9636c8db test issues 2025-03-14 00:53:58 -04:00
Eddi3_As
e2376dd8c3 FIX undefined IMG_URL 2025-03-14 00:45:59 -04:00
4 changed files with 7 additions and 4 deletions

View file

@ -2,7 +2,7 @@
const ENV_VARIABLES = {
MODE: process.env.MODE || "production",
VITE_BACKEND_URL: process.env.VITE_BACKEND_URL || "",
IMG_URL: process.env.MODE == "development" ? process.env.VITE_BACKEND_URL : process.env.IMG_URL,
IMG_URL: typeof import.meta !== "undefined" ? import.meta.env.VITE_IMG_URL || "http://localhost" : process.env.VITE_IMG_URL || "http://localhost",
BACKEND_URL: process.env.SITE_URL != undefined ? `${process.env.SITE_URL}${process.env.USE_PORTS ? `:${process.env.BACKEND_PORT}`:''}` : process.env.VITE_BACKEND_URL || '',
FRONTEND_URL: process.env.SITE_URL != undefined ? `${process.env.SITE_URL}${process.env.USE_PORTS ? `:${process.env.PORT}`:''}` : ''
};

View file

@ -27,7 +27,8 @@
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"esModuleInterop": true
"esModuleInterop": true,
"types": ["vite/client"]
},
// "exclude": [
// // "src/components/GiftTemplate/**/*",

View file

@ -7,6 +7,8 @@ services:
context: ./client
dockerfile: Dockerfile
container_name: frontend
environment:
VITE_IMG_URL: http://localhost
ports:
- "5173:5173"
restart: always
@ -54,7 +56,7 @@ services:
image: mongo
container_name: mongo
ports:
- "27017:27017"
- "27019:27017"
tty: true
volumes:
- mongodb_data:/data/db

View file

@ -10,7 +10,7 @@ services:
- VITE_BACKEND_URL=
# Define empty VITE_BACKEND_SOCKET_URL so it will default to window.location.host
- VITE_BACKEND_SOCKET_URL=
- IMG_URL: https://evalsa.etsmtl.ca
- VITE_IMG_URL=https://evalsa.etsmtl.ca
ports:
- "5173:5173"
restart: always