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
42 lines (39 loc) · 792 Bytes
/
compose.yaml
File metadata and controls
42 lines (39 loc) · 792 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
include:
- proxy.yaml
services:
db:
image: mysql:8
restart: always
env_file:
- .env
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
networks:
backend:
ipv4_address: 172.20.0.10
web:
build:
context: .
dockerfile: Dockerfile.python
restart: on-failure
env_file:
- .env
environment:
DB_HOST: db
DB_USER: ${MYSQL_USER}
DB_PASSWORD: ${MYSQL_PASSWORD}
DB_NAME: ${MYSQL_DATABASE}
networks:
backend:
ipv4_address: 172.20.0.5
depends_on:
- db
networks:
backend:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/24