-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-prod.yml
68 lines (63 loc) · 1.69 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
version: '2.1'
services:
postgres:
restart: always
container_name: postgres
image: postgres:10
environment:
- POSTGRES_USER=${PROD_POSTGRES_USER}
- POSTGRES_PASSWORD=${PROD_POSTGRES_PASSWORD}
- POSTGRES_DB=${PROD_POSTGRES_DB}
volumes:
- ~/snailpass-data/postgres-data/postgres:/var/lib/postgresql/data
ports:
- "5432:5432"
flask:
restart: always
container_name: flask
environment:
- SNAILPASS_SECRET_KEY=${SNAILPASS_SECRET_KEY}
- SNAILPASS_DATABASE_URI=${SNAILPASS_DATABASE_URI}
- MAIL_DEFAULT_SENDER=${MAIL_DEFAULT_SENDER}
- MAIL_USERNAME=${MAIL_USERNAME}
- MAIL_PASSWORD=${MAIL_PASSWORD}
- SNAILPASS_CONFIGURATION=prod
build:
context: .
dockerfile: Dockerfile-prod
ports:
- 5001:5001
depends_on:
- postgres
entrypoint:
- scripts/start_prod.sh
volumes:
- .:/snailpass-server
redis:
image: redis:latest
container_name: redis
depends_on:
- flask
celery:
environment:
- RESULT_BACKEND=${RESULT_BACKEND}
- CELERY_BROKER_URL=${CELERY_BROKER_URL}
- MAIL_USERNAME=${MAIL_USERNAME}
- MAIL_PASSWORD=${MAIL_PASSWORD}
- MAIL_DEFAULT_SENDER=${MAIL_DEFAULT_SENDER}
container_name: celery
command: celery -A celery_app.celery_app worker --loglevel=info
build:
context: .
dockerfile: Dockerfile-celery
depends_on:
- redis
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4:7.3
ports:
- 5050:5050
environment:
- PGADMIN_LISTEN_PORT=5050
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_DEFAULT_PASSWORD}