-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·57 lines (54 loc) · 1.19 KB
/
docker-compose.yml
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
version: '2'
services:
mosque-db:
build:
context: ./db
dockerfile: ./Dockerfile
image: mosque/db
container_name: mosque-db
restart: always
networks:
- default
volumes:
- data-db:/var/lib/mysql
- ./db/config:/etc/mysql/conf.d
environment:
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASS}
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASS}
- MYSQL_DATABASE=${DB_NAME}
- TZ=Europe/Berlin
mosque-api:
build:
context: ./app
image: mosque/api
container_name: mosque-api
restart: always
depends_on:
- mosque-db
networks:
- default
volumes:
- data-img:/app/img
- ./app:/app
ports:
- "${API_PORT}:5000"
environment:
- FLASK_APP=app.py
- FLASK_DEBUG=1
- TZ=Europe/Berlin
- APP_ID=${APP_ID}
- APP_SIGNATURE=${APP_SIGNATURE}
- API_KEY=${API_KEY}
- SECRET_KEY=${SECRET_KEY}
- SQLALCHEMY_DATABASE_URI=mysql+pymysql://${DB_USER}:${DB_PASS}@mosque-db:3306/${DB_NAME}?charset=latin1
networks:
default:
driver: bridge
volumes:
data-db:
external: false
driver: local
data-img:
external: false
driver: local