1
1
version : ' 3.1'
2
2
3
3
services :
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
+
5
15
backend :
6
16
image : mugemanebertin/eagle_ec_be:latest
7
- container_name : express-server -container
17
+ container_name : eagle-ec-be -container
8
18
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"
14
21
depends_on :
15
- - postgres_db
22
+ - db
16
23
- redis
17
- env_file :
18
- - ./.env
19
24
environment :
20
25
- DB_CONNECTION=${DOCKER_DB_CONNECTION}
21
26
- JWT_SECRET=${JWT_SECRET}
@@ -30,14 +35,12 @@ services:
30
35
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
31
36
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
32
37
- GOOGLE_CALLBACK_URL=${GOOGLE_CALLBACK_URL}
33
- - FE_URL=${FE_URL}
34
- networks :
35
- - eagle-ec
38
+ - REDIS_HOST=redis
39
+ - REDIS_PORT=6379
36
40
37
- # PostgreSQL Database Service
38
- postgres_db :
41
+ db :
39
42
image : postgres:latest
40
- container_name : postgres -db-container
43
+ container_name : eagle-ec -db-container
41
44
ports :
42
45
- " 5433:5432"
43
46
environment :
@@ -46,41 +49,11 @@ services:
46
49
- POSTGRES_DB=${POSTGRES_DB}
47
50
volumes :
48
51
- postgres_data:/var/lib/postgresql/data
49
- networks :
50
- - eagle-ec
51
52
52
- # Redis Service
53
53
redis :
54
54
image : redis:latest
55
- container_name : redis-container
56
55
ports :
57
56
- " 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
80
57
81
58
volumes :
82
- postgres_data :
83
-
84
- networks :
85
- eagle-ec :
86
- driver : bridge
59
+ postgres_data:
0 commit comments