-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-prod.yml
82 lines (75 loc) · 1.82 KB
/
docker-compose-prod.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
version: '3.6'
volumes:
phame_data: {}
postgres_data_local: {}
postgres_backup_local: {}
services:
nginx:
build:
context: ./services/nginx
dockerfile: Dockerfile-dev
restart: always
ports:
- 80:80
depends_on:
- phame
# flask app that calls shell script that runs phame
phame-app:
build:
context: ./services/phame-app
dockerfile: Dockerfile
depends_on:
- redis
expose:
- 5001
volumes:
- phame_data:/phame_api/media
- /vol_d/api/uploads:/usr/src/app/static/uploads
# flask-based API
phame:
build:
context: ./services/phame
dockerfile: Dockerfile-prod
volumes:
- phame_data:/phame_api/media
- /vol_d/api/uploads:/usr/src/app/static/uploads
expose:
- 5000
env_file:
- ./.envs/.prod/.phame
- ./.envs/.prod/.email
environment:
- FLASK_ENV=development
- FLASK_APP=project/__init__.py
- APP_SETTINGS=project.config.ProductionConfig
- DATABASE_URL=postgres://debug:debug@phame-db:5432/phame_prod
- DATABASE_TEST_URL=postgres://debug:debug@phame-db:5432/phame_test
- SECRET_KEY=${SECRET_KEY}
depends_on:
- phame-db
phame-db:
build:
context: ./services/phame/project/db
dockerfile: Dockerfile
volumes:
- postgres_data_local:/var/lib/postgresql/data
- postgres_backup_local:/backups
ports:
- 5435:5432
env_file:
- ./.envs/.prod/.postgres
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
monitor:
build:
context: ./services/celery-queue
dockerfile: Dockerfile
ports:
- "5555:5555"
entrypoint: flower
command: -A tasks --port=5555 --broker=redis://redis:6379/0
depends_on:
- redis
redis:
image: redis