11version : ' 3.1'
22
33services :
4- # Backend Service
4+ web :
5+ build :
6+ context : .
7+ dockerfile : Dockerfile
8+ container_name : eagle-ec-fe-container
9+ image : mugemanebertin/eagle-ec-fe
10+ ports :
11+ - " 5173:5173"
12+ env_file :
13+ - .env
14+
515 backend :
616 image : mugemanebertin/eagle_ec_be:latest
7- container_name : express-server -container
17+ container_name : eagle-ec-be -container
818 ports :
9- - " ${PORT}:${PORT}"
10- volumes :
11- - ./backend:/usr/src/app
12- - /usr/src/app/node_modules
13- command : sh -c "npm run migrate && npm run seed || true && npm run dev"
19+ - " 499:499"
20+ command : sh -c "npm run migrate && (npm run seed || true) && npm run dev"
1421 depends_on :
15- - postgres_db
22+ - db
1623 - redis
17- env_file :
18- - ./.env
1924 environment :
2025 - DB_CONNECTION=${DOCKER_DB_CONNECTION}
2126 - JWT_SECRET=${JWT_SECRET}
@@ -30,14 +35,12 @@ services:
3035 - GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
3136 - GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
3237 - GOOGLE_CALLBACK_URL=${GOOGLE_CALLBACK_URL}
33- - FE_URL=${FE_URL}
34- networks :
35- - eagle-ec
38+ - REDIS_HOST=redis
39+ - REDIS_PORT=6379
3640
37- # PostgreSQL Database Service
38- postgres_db :
41+ db :
3942 image : postgres:latest
40- container_name : postgres -db-container
43+ container_name : eagle-ec -db-container
4144 ports :
4245 - " 5433:5432"
4346 environment :
@@ -46,41 +49,11 @@ services:
4649 - POSTGRES_DB=${POSTGRES_DB}
4750 volumes :
4851 - postgres_data:/var/lib/postgresql/data
49- networks :
50- - eagle-ec
5152
52- # Redis Service
5353 redis :
5454 image : redis:latest
55- container_name : redis-container
5655 ports :
5756 - " 6379:6379"
58- networks :
59- - eagle-ec
60-
61- # Web Frontend Service
62- frontend :
63- build :
64- context : .
65- dockerfile : Dockerfile
66- container_name : eagle-ec-fe-container
67- image : mugemanebertin/eagle-ec-fe
68- ports :
69- - " 5173:5173"
70- env_file :
71- - ./.env
72- volumes :
73- - ./frontend:/app
74- - /app/node_modules
75- networks :
76- - eagle-ec
77- command : npm run dev -- --host
78- depends_on :
79- - backend
8057
8158volumes :
82- postgres_data :
83-
84- networks :
85- eagle-ec :
86- driver : bridge
59+ postgres_data:
0 commit comments