-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
62 lines (57 loc) · 1.22 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
services:
backend:
build: ./backend
ports:
- "8080"
networks:
- app-network
volumes:
- ./backend/credentials.json:/app/credentials.json
environment:
- GOOGLE_APPLICATION_CREDENTIALS=/app/credentials.json
depends_on:
database:
condition: service_healthy
frontend:
build: ./frontend
ports:
- "5173"
networks:
- app-network
depends_on:
- backend
database:
image: mysql:8.3.0
command: --default-authentication-plugin=caching_sha2_password --bind-address=0.0.0.0
environment:
MYSQL_ROOT_PASSWORD: admin123
MYSQL_DATABASE: quizzard
MYSQL_USER: quizzard
MYSQL_PASSWORD: quizzard
ports:
- "3306"
volumes:
- db-data:/var/lib/mysql
- ./database:/docker-entrypoint-initdb.d
networks:
- app-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 5s
retries: 10
nginx:
image: nginx:latest
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
networks:
- app-network
depends_on:
- backend
- frontend
networks:
app-network:
driver: bridge
volumes:
db-data: