Repository navigation
Expand file tree
/
Copy pathdocker-compose.full.yml
More file actions
102 lines (97 loc) · 2.21 KB
/
Copy pathdocker-compose.full.yml
File metadata and controls
102 lines (97 loc) · 2.21 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
services:
frontend:
build:
context: .
dockerfile: Dockerfile
args:
- VITE_API_BASE_URL=http://backend:3000
- VITE_GOOGLE_CLIENT_ID=${VITE_GOOGLE_CLIENT_ID}
- VITE_MICROSOFT_CLIENT_ID=${VITE_MICROSOFT_CLIENT_ID}
- VITE_LINKEDIN_CLIENT_ID=${VITE_LINKEDIN_CLIENT_ID}
container_name: zenbit-frontend
ports:
- "${FRONTEND_PORT:-8080}:80"
networks:
- app-network
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
healthcheck:
test:
[
"CMD",
"wget",
"--no-verbose",
"--tries=1",
"--spider",
"http://localhost/health",
]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
backend:
image: zenbit-backend:latest
container_name: zenbit-backend
ports:
- "${BACKEND_PORT:-3000}:3000"
networks:
- app-network
depends_on:
mysql:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
mysql:
image: mysql:8.0
container_name: zenbit-mysql
ports:
- "${DB_PORT:-3306}:3306"
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-rootpassword}
MYSQL_DATABASE: ${DB_NAME:-green_db}
MYSQL_USER: ${DB_USER:-green_user}
MYSQL_PASSWORD: ${DB_PASSWORD:-green_password}
volumes:
- mysql-data:/var/lib/mysql
networks:
- app-network
restart: unless-stopped
healthcheck:
test:
[
"CMD",
"mysqladmin",
"ping",
"-h",
"localhost",
"-u",
"root",
"-p${DB_ROOT_PASSWORD:-rootpassword}",
]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
adminer:
image: adminer:latest
container_name: zenbit-adminer
ports:
- "${ADMINER_PORT:-8081}:8080"
networks:
- app-network
depends_on:
- mysql
restart: unless-stopped
volumes:
mysql-data:
driver: local
networks:
app-network:
driver: bridge