-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
62 lines (57 loc) · 1.34 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
58
59
60
61
62
version: '2.1'
services:
db:
image: postgres
environment:
POSTGRES_PASSWORD: passw0rd
networks:
- default
ports:
- '5432:5432'
db_init:
depends_on:
- db
image: postgres
networks:
- default
environment:
PGPASSWORD: passw0rd
volumes:
- ./psql_deploy:/psql_deploy
command: ['./psql_deploy/init_db.sh']
db-migrate:
depends_on:
- db
- db_init
build:
context: .
dockerfile: docker/memory_shaper/Dockerfile
environment:
APP_ENVIRONMENT: Dev
DATABASE_URL: postgresql+psycopg2://postgres:passw0rd@db:5432/shaper
SECRET_KEY: secret
volumes:
- ./memory_shaper:/memory_shaper
command: bash -c "cd memory_shaper && python3 manage.py db upgrade"
memory_shaper:
depends_on:
- db
- db-migrate
build:
context: .
dockerfile: docker/memory_shaper/Dockerfile
networks:
- default
ports:
- '5000:5000'
environment:
APP_ENVIRONMENT: Dev
DATABASE_URL: postgresql+psycopg2://postgres:passw0rd@db:5432/shaper
SECRET_KEY: secret
FLASK_ENV: development
FLASK_APP: memory_shaper/run_app.py
LC_ALL: C.UTF-8
LANG: C.UTF-8
volumes:
- ./memory_shaper:/memory_shaper
command: ['python3', '-m', 'flask', 'run', '--host=0.0.0.0']