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
38 lines (36 loc) · 784 Bytes
/
compose.yaml
File metadata and controls
38 lines (36 loc) · 784 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
include:
- proxy.yaml
version: "1.1"
services:
web:
build:
context: .
dockerfile: Dockerfile.python
restart: always
networks:
backend:
ipv4_address: 172.20.0.5
environment:
DB_HOST: 172.20.0.10
DB_PORT: 3306
DB_NAME: ${MYSQL_DATABASE}
DB_USER: ${MYSQL_USER}
DB_PASS: ${MYSQL_PASSWORD}
DB_PASSWORD: ${MYSQL_PASSWORD}
db:
image: mysql:8
restart: always
networks:
backend:
ipv4_address: 172.20.0.10
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
networks:
backend:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/24