-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
86 lines (80 loc) · 1.91 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
version: '3.1'
services:
# Backend Service
backend:
image: mugemanebertin/eagle_ec_be:latest
container_name: express-server-container
ports:
- "${PORT}:${PORT}"
volumes:
- ./backend:/usr/src/app
- /usr/src/app/node_modules
command: sh -c "npm run migrate && npm run seed || true && npm run dev"
depends_on:
- postgres_db
- redis
env_file:
- ./.env
environment:
- DB_CONNECTION=${DOCKER_DB_CONNECTION}
- JWT_SECRET=${JWT_SECRET}
- PORT=${PORT}
- SMTP_HOST=${SMTP_HOST}
- SMTP_PORT=${SMTP_PORT}
- SMTP_USER=${SMTP_USER}
- SMTP_PASS=${SMTP_PASS}
- CLOUD_NAME=${CLOUD_NAME}
- CLOUD_KEY=${CLOUD_KEY}
- CLOUD_SECRET=${CLOUD_SECRET}
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
- GOOGLE_CALLBACK_URL=${GOOGLE_CALLBACK_URL}
- FE_URL=${FE_URL}
networks:
- eagle-ec
# PostgreSQL Database Service
postgres_db:
image: postgres:latest
container_name: postgres-db-container
ports:
- "5433:5432"
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- eagle-ec
# Redis Service
redis:
image: redis:latest
container_name: redis-container
ports:
- "6379:6379"
networks:
- eagle-ec
# Web Frontend Service
frontend:
build:
context: .
dockerfile: Dockerfile
container_name: eagle-ec-fe-container
image: mugemanebertin/eagle-ec-fe
ports:
- "5173:5173"
env_file:
- ./.env
volumes:
- ./frontend:/app
- /app/node_modules
networks:
- eagle-ec
command: npm run dev -- --host
depends_on:
- backend
volumes:
postgres_data:
networks:
eagle-ec:
driver: bridge