-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.prod.yml
124 lines (117 loc) · 3.13 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Container logging - saves logs of running/stopped (but not removed) containers!
# (includes application logs - see /log/log_config_{environment}.json -
# but also docker events & system information)
# View with: docker logs [-f / --follow] <container_id_or_name>
x-logging:
&default-logging
driver: "json-file"
options:
max-size: '20m'
max-file: '5'
compress: 'true'
volumes:
postgres-db:
blast-db:
uploads:
exports:
downloads:
fasta-exports:
secrets:
postgres_pass:
file: .secret.postgres_pass
postgrest_config:
file: .secret.postgrest_config
email_config:
file: .secret.email_config
ipt_pass:
file: .secret.ipt_pass
auth_pass:
file: .secret.auth_pass
services:
postgres:
restart: always
image: postgres:14
container_name: asv-db
logging: *default-logging
volumes:
- ./db/db-data-schema.sql:/docker-entrypoint-initdb.d/01-data-schema.sql
- ./db/db-api-schema.sql:/docker-entrypoint-initdb.d/02-api-schema.sql
- ./db/db-roles.sql:/docker-entrypoint-initdb.d/03-roles.sql
- ./db/restrict_db_access.sh:/docker-entrypoint-initdb.d/04-restrict-db.sh
- postgres-db:/var/lib/postgresql/data
env_file:
- .env
# Connect ports (HOST:CONTAINER) for IPT and pgAdmin (SSH)
ports:
- 5432:5432
secrets:
- postgres_pass
- ipt_pass
- auth_pass
environment:
# This will directly set POSTGRES_PASSWORD during db initialization
# as explained here: https://hub.docker.com/_/postgres
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_pass
# ... but these need to be explicitly read - see db-roles.sql
- POSTGRES_IPT_PASS_FILE=/run/secrets/ipt_pass
- POSTGRES_AUTH_PASS_FILE=/run/secrets/auth_pass
postgrest:
restart: always
image: bioatlas/molmod-postgrest:${TAG:-latest}
build:
context: ./
dockerfile: docker/postgrest
container_name: asv-rest
logging: *default-logging
env_file:
- .env
secrets:
- postgrest_config
depends_on:
- postgres
blast-worker:
# Can not have container-name set
image: bioatlas/molmod-blast:${TAG:-latest}
init: true
build:
context: ./
dockerfile: docker/blast
logging: *default-logging
env_file:
- .env
secrets:
- postgres_pass
environment:
- RUN_ENV=production
- FLASK_DEBUG=0
- BLAST_USAGE_REPORT=false
volumes:
- blast-db:/blastdbs
asv-main:
restart: always
image: bioatlas/molmod:${TAG:-latest}
build:
context: ./
dockerfile: docker/production
container_name: asv-main
logging: *default-logging
volumes:
- uploads:/app/uploads
- exports:/app/exports
- downloads:/app/downloads
- fasta-exports:/app/fasta-exports
env_file:
- .env
secrets:
- postgres_pass
- email_config
environment:
- PYTHONPATH=/app/molmod
- FLASK_DEBUG=0
- CAS_AFTER_LOGOUT=${HOST_URL:-${CAS_AFTER_LOGOUT}}
- MAINTENANCE_MODE=${MAINTENANCE_MODE:-0}
- MAINTENANCE_ROUTES=${MAINTENANCE_ROUTES-All}
ports:
- 5000:5000
depends_on:
- postgrest