-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
74 lines (69 loc) · 1.49 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
services:
db:
image: mysql:8.0.33
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_TCP_PORT: ${MYSQL_TCP_PORT}
ports:
- "3307:3307"
volumes:
- "db_data:/var/lib/mysql"
networks:
- cardmaker
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 5s
retries: 10
api:
build: ./api
environment:
DATABASE_URL: ${DATABASE_URL}
SECRET_KEY: ${SECRET_KEY}
API_KEY: ${API_KEY}
USE_API_KEY: ${USE_API_KEY}
depends_on:
db:
condition: service_healthy
volumes:
- ./api:/app
networks:
- cardmaker
healthcheck:
test: curl --fail http://localhost:8003/tags || exit 1
timeout: 5s
retries: 10
frontend:
build: ./cardMakerFE
networks:
- cardmaker
healthcheck:
test: curl --fail http://localhost:3005/ || exit 1
timeout: 5s
retries: 10
proxy:
image: nginx:alpine
ports:
- "9875:9875"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
networks:
- cardmaker
depends_on:
api:
condition: service_healthy
frontend:
condition: service_healthy
expose:
- 9875
volumes:
db_data:
networks:
cardmaker:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.28.0.0/16