This repository has been archived by the owner on Apr 13, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
/
common.yaml
86 lines (81 loc) · 2.79 KB
/
common.yaml
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
version: "2.4"
services:
odoo:
image: $ODOO_IMAGE:$ODOO_MINOR
build:
context: ./odoo
args:
ODOO_VERSION: $ODOO_MINOR
UID: "${UID:-1000}"
GID: "${GID:-1000}"
environment:
EMAIL_FROM: "$SMTP_DEFAULT_FROM"
PGDATABASE: &dbname prod
PGUSER: &dbuser "$DB_USER"
DB_FILTER: "$DB_FILTER"
PROXY_MODE: "$ODOO_PROXY_MODE"
hostname: "$SMTP_REAL_NON_CANONICAL_DEFAULT"
tty: true
volumes:
- filestore:/var/lib/odoo:z
labels:
traefik.backend.buffering.retryExpression: IsNetworkError() && Attempts() < 5
traefik.docker.network: "inverseproxy_shared"
traefik.enable: "true"
traefik.frontend.passHostHeader: "true"
traefik.longpolling.port: "8072"
traefik.port: "8069"
db:
image: tecnativa/postgres-autoconf:${DB_VERSION}-alpine
shm_size: 512mb
environment:
POSTGRES_DB: *dbname
POSTGRES_USER: *dbuser
CONF_EXTRA: |
work_mem = 32MB
volumes:
- db:/var/lib/postgresql/data:z
smtpfake:
image: mailhog/mailhog
smtpreal:
image: tvial/docker-mailserver:latest
domainname: "$SMTP_REAL_MAILNAME"
stop_grace_period: 1m
volumes:
- mailconfig:/tmp/docker-mailserver:z
- maildata:/var/mail:z
- maillogs:/var/log/mail:z
- maillogssupervisord:/var/log/supervisor:z
- mailstate:/var/mail-state:z
cap_add:
- SYS_PTRACE
environment:
DEFAULT_RELAY_HOST: "[$SMTP_REAL_RELAY_HOST]:$SMTP_REAL_RELAY_PORT"
DMS_DEBUG: 0
ENABLE_SRS: 1
ONE_DIR: 1
PERMIT_DOCKER: connected-networks
POSTFIX_MESSAGE_SIZE_LIMIT: 52428800 # 50 MiB
RELAY_HOST: "$SMTP_REAL_RELAY_HOST"
RELAY_PORT: "$SMTP_REAL_RELAY_PORT"
RELAY_USER: "$SMTP_REAL_RELAY_USER"
SMTP_ONLY: 1
SRS_DOMAINNAME: "$SMTP_REAL_NON_CANONICAL_DEFAULT"
SRS_EXCLUDE_DOMAINS: "$SMTP_REAL_CANONICAL_DOMAINS"
SRS_SENDER_CLASSES: envelope_sender,header_sender
backup:
image: tecnativa/duplicity:postgres-s3
hostname: backup
domainname: "$DOMAIN_PROD"
init: true
environment:
DST: "s3://s3.amazonaws.com/$BACKUP_S3_BUCKET"
EMAIL_FROM: "$BACKUP_EMAIL_FROM"
EMAIL_TO: "$BACKUP_EMAIL_TO"
PGDATABASE: *dbname
PGUSER: *dbuser
SMTP_HOST: smtplocal
TZ: "$BACKUP_TZ"
volumes:
- backup_cache:/root:z
- filestore:/mnt/backup/src/odoo:z