-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
134 lines (130 loc) · 4.26 KB
/
docker-compose.yaml
File metadata and controls
134 lines (130 loc) · 4.26 KB
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
125
126
127
128
129
130
131
132
133
134
version: '3.4'
services:
nginx:
build:
context: ./docker/nginx
volumes:
- ./conf/ssl:/etc/nginx/ssl:ro
ports:
- "80:80"
- "443:443"
environment:
# A comma-separated list of server names
SERVER_NAMES: "local.quetz.al"
ADMIN_EMAIL: "admin@quetz.al"
DISABLE_CERTBOT: "1"
links:
- web
db:
build:
context: ./docker/db
command: postgres -c config_file=/etc/postgresql/postgresql.conf
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: pg_password
volumes:
# A persistent volume so that the database can be restored after a
# docker-compose stop.
# Note that it will be lost after a docker-compose down.
- /var/lib/postgresql/data
- ./logs:/var/log/postgres
ports:
# For debugging, sometimes it is useful to open the database port
- "5432:5432"
rabbitmq:
build:
context: ./docker/rabbitmq
ports:
# For debugging and local test it is useful to open the rabbitmq port
- "5672:5672"
# Optional: exposing the 15672; the rabbitmq web management interface
- "15672:15672"
web:
build:
context: .
dockerfile: ./docker/app/Dockerfile
target: development
environment:
FLASK_ENV: development
DB_USERNAME: db_user
DB_PASSWORD: db_password
DB_HOST: db
DB_PORT: 5432
DB_DATABASE: quetzal
USE_GUNICORN: 1
QUETZAL_BACKGROUND_JOBS: 1
QUETZAL_ADMIN_MAIL: quetzal.api@gmail.com
## Set this for Google Cloud Platform
# QUETZAL_DATA_STORAGE: GCP
# When using local storage instead of GCP buckets for data, use this
# configuration together with the volumes declared later
QUETZAL_DATA_STORAGE: file
QUETZAL_FILE_DATA_DIR: /mnt/data
QUETZAL_FILE_USER_DATA_DIR: /mnt/workspaces
# KOMBU_LOG_CONNECTION: 1 # Useful to debug kombu bug
volumes:
# Setup a volume for development: it allows the web container to have the
# latest changes so one does not need to build everytime there is a
# modification.
- .:/code
# The secret files in the configuration are set as a volume, but don't use
# it like this on production, use a secret!
- ./conf:/code/conf:ro
# When using local storage instead of GCP buckets for data, create two
# directories and add them here:
- ./data/global:/mnt/data
- ./data/workspaces:/mnt/workspaces
depends_on:
- db
- rabbitmq
# ports:
# # Remove when the nginx service is added
# - "5000:5000"
# # Maybe needed to attach with docker-compose run --service-ports web command
# # stdin_open: true
# tty: true
worker:
build:
context: .
dockerfile: ./docker/app/Dockerfile
target: development
entrypoint: /entrypoint-worker.sh
environment:
FLASK_ENV: development
DB_USERNAME: db_user
DB_PASSWORD: db_password
DB_HOST: db
DB_PORT: 5432
DB_DATABASE: quetzal
USE_GUNICORN: 1
QUETZAL_BACKGROUND_JOBS: 1
QUETZAL_ADMIN_MAIL: quetzal.api@gmail.com
## Set this for Google Cloud Platform
# QUETZAL_DATA_STORAGE: GCP
# When using local storage instead of GCP buckets for data, use this
# configuration together with the volumes declared later
QUETZAL_DATA_STORAGE: file
QUETZAL_FILE_DATA_DIR: /mnt/data
QUETZAL_FILE_USER_DATA_DIR: /mnt/workspaces
# KOMBU_LOG_CONNECTION: 1 # Useful to debug kombu bug
volumes:
# Setup a volume for development: it allows the web container to have the
# latest changes so one does not need to build everytime there is a
# modification.
- .:/code
# The secret files in the configuration are set as a volume, but don't use
# it like this on production, use a secret!
- ./conf:/code/conf:ro
# When using local storage instead of GCP buckets for data, create two
# directories and add them here:
- ./data/global:/mnt/data
- ./data/workspaces:/mnt/workspaces
depends_on:
- db
- rabbitmq
# ports:
# # Remove when the nginx service is added
# - "5000:5000"
# # Maybe needed to attach with docker-compose run --service-ports web command
# # stdin_open: true
# tty: true