forked from netology-code/shvirtd-example-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
47 lines (42 loc) · 920 Bytes
/
compose.yaml
File metadata and controls
47 lines (42 loc) · 920 Bytes
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
include:
- proxy.yaml
services:
db:
image: mysql:8
container_name: mysql-container
restart: always
env_file:
- .env
networks:
backend:
ipv4_address: 172.20.0.10
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u${MYSQL_USER}", "-p${MYSQL_PASSWORD}"]
interval: 5s
timeout: 3s
retries: 10
start_period: 10s
web:
image: cr.yandex/crpvp46miuir2eoc750g/my-python-app:v1
container_name: web
restart: always
env_file:
- .env
networks:
backend:
ipv4_address: 172.20.0.5
depends_on:
db:
condition: service_healthy
command: >
sh -c "sleep 15 && uvicorn main:app --host 0.0.0.0 --port 5000"
volumes:
mysql_data:
networks:
backend:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/24