-
Notifications
You must be signed in to change notification settings - Fork 14
/
production.yml
70 lines (67 loc) · 2.38 KB
/
production.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
version: "3.5"
services:
db:
shm_size: 1g
restart: always
# volumes:
# - /WHERE/TO/SAVE/BACKUPS:/backups
# On-prem, it can be helpul to expose the database and use various analytics products
# At Samsung we use Metabase to show a detailed dashboard of the storage used.
# ports:
# - 5432:5432
pgadmin:
restart: always
backend:
restart: always
environment:
# To use values beyond 128, read
# * https://stackoverflow.com/a/36452474/5993501
# * https://uwsgi-docs.readthedocs.io/en/latest/articles/TheArtOfGracefulReloading.html#the-listen-queue
# * https://stackoverflow.com/questions/43243483/docker-container-increase-listen-queue-size-beyond-128
# * https://serverfault.com/questions/271380/how-can-i-increase-the-value-of-somaxconn
- UWSGI_LISTEN_QUEUE_SIZE=1024
- UWSGI_CHEAPER_ALGO_BUSYNESS=true
- UWSGI_CHEAPER_INITIAL=16 # initial number of processes
- UWSGI_PROCESSES=64 # max
- UWSGI_CHEAPER=8 # minimum
- UWSGI_STATS=true
# leave an unbound port open, useful for debugging
ports:
- ${QABOARD_PORT_DEBUG:-5152}:3001
# https://github.com/compose-spec/compose-spec/blob/master/spec.md#sysctls
sysctls:
- net.core.somaxconn=1024
proxy:
restart: always
cantaloupe:
restart: always
rabbitmq:
restart: always
flower:
restart: always
# # Adapted from https://devopsheaven.com/cron/docker/alpine/linux/2017/10/30/run-cron-docker-alpine.html
# # To trigger a backup manually call: docker-compose -f docker-compose.yml -f production.yml up -d cron-backup-db
# # docker-compose run /etc/periodic/daily/backup
# cron-backup-db:
# image: postgres:12-alpine
# restart: always
# depends_on:
# - db
# environment:
# # https://www.postgresql.org/docs/9.3/libpq-envars.html
# PGHOST: ${PGHOST:-db}
# PGDATABASE: qaboard
# PGUSER: qaboard
# PGPASSWORD: password
# # when using NFS you often don't want to run as root
# AS_USER_NAME: username
# AS_USER_GROUP: groupname
# AS_USER_UID: user_uid
# AS_USER_GID: group_gid
# # https://busybox.net/downloads/BusyBox.html
# # -f: foreground
# # -d: log to stderr, 0 is the most verbose, default 8
# command: crond -f -d 0
# volumes:
# - ./services/db/backup:/etc/periodic/daily/backup:ro
# - /WHERE/TO/SAVE/BACKUPS:/backups