-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (53 loc) · 1.25 KB
/
docker-compose.yml
File metadata and controls
55 lines (53 loc) · 1.25 KB
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
version: '3'
services:
app:
image: arch/flask_app:latest
container_name: flask_app
restart: unless-stopped
labels:
project: "Architrave"
day: "26 April 2023"
build:
# build the image from Dockerfile
context: .
dockerfile: Dockerfile
environment:
# set database, memcached etc credentials
DB_HOST: mysql
DB_NAME: docs_db
DB_USERNAME: root
DB_PASSWORD: connect10
volumes:
- ./app:/app
links:
# network connection with these services
- mysql
depends_on:
# build those images first
- mysql
ports:
# bind on our 5000 port because most people have 80, 8080 already bound
- "5000:5000"
mysql:
container_name: flask_mysql
image: mysql
volumes:
# pass volume named mysql-data to mysql container
- mysql-data:/var/lib/mysql
restart: unless-stopped
labels:
project: "Architrave"
day: "26 April 2023"
# ports:
# - "3306:3306"
environment:
# credentials
MYSQL_ROOT_PASSWORD: connect10
MYSQL_DATABASE: docs_db
# MYSQL_USER: root
MYSQL_PASSWORD: connect10
# volumes definition here
volumes:
# just a persistance data
mysql-data:
driver: local