-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
60 lines (57 loc) · 1.07 KB
/
docker-compose.yaml
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
version: "3.9"
networks:
kambud23_net:
driver: bridge
volumes:
kambud23_db_data:
services:
db:
image: rapidfort/mariadb:10.4
container_name: kambud23_db
cpus: 0.7
mem_limit: 600m
restart: on-failure
networks:
- kambud23_net
volumes:
- kambud23_db_data:/var/lib/mysql
env_file:
- .env
environment:
- MARIADB_ROOT_PASSWORD=${DB_PASSWORD}
- MARIADB_DATABASE=${DB_DATABASE}
ports:
- "${DB_HOST_PORT}:3306"
healthcheck:
test:
[
"CMD",
"mysqladmin",
"ping",
"-h",
"${DB_HOST}",
"-u",
"${DB_USERNAME}",
"-p${DB_PASSWORD}"
]
interval: 10s
timeout: 5s
retries: 5
backend:
build: .
container_name: kambud23_be
cpus: 0.3
mem_limit: 120m
restart: on-failure
networks:
- kambud23_net
env_file:
- .env
environment:
- DB_HOST=db
ports:
- "80:${APP_PORT}"
- "443:443"
depends_on:
db:
condition: service_healthy