forked from foodcoops/foodcoops.net
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
151 lines (135 loc) · 3.6 KB
/
docker-compose.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
version: '2'
services:
certbot:
image: foodcoops/certbot:latest
restart: always
environment:
- CERTBOT_DISABLED
- CERTBOT_EMAIL=systems-all@${DOMAIN}
- CERTBOT_TOUCH_FILE=/triggers/reload-certs
- CERTBOT_DOMAINS=|-
${HOSTNAME_ORDER},vers.${DOMAIN}
${HOSTNAME_MEMBERS}
volumes:
- certs:/certs
- triggers:/triggers
foodsoft:
build: foodsoft
restart: always
environment:
- DATABASE_URL=mysql2://foodsoft:${FOODSOFT_DB_PASSWORD}@mariadb/foodsoft_vkmkm?encoding=utf8mb4
- EMAIL_SENDER=systems@${DOMAIN}
- ERROR_RECIPIENTS=systems-all@${DOMAIN}
- DOMAIN
- HOSTNAME=${HOSTNAME_ORDER}
- HOSTNAME_MEMBERS
- QUEUE=foodsoft_notifier
- REDIS_URL=redis://redis:6379
- SECRET_KEY_BASE=${FOODSOFT_SECRET_KEY_BASE}
- SHAREDLISTS_DATABASE_URL=mysql2://foodsoft:${FOODSOFT_DB_PASSWORD}@mariadb/sharedlists?encoding=utf8mb4
- VOKOMOKUM_CLIENT_SECRET
- MAILER_DOMAIN=${HOSTNAME_ORDER}
- MAILER_PREFIX=foodsoft+
- SMTP_ADDRESS=smtp
- SMTP_ENABLE_STARTTLS_AUTO=false
foodsoft_cron:
extends: foodsoft
command: ./proc-start cron
foodsoft_worker:
extends: foodsoft
command: ./proc-start worker
foodsoft_smtp:
extends: foodsoft
command: ./proc-start mail
environment:
- SMTP_SERVER_PORT=2525
- SMTP_SERVER_HOST=0.0.0.0
members:
build: members
environment:
- DOMAIN
- HOSTNAME=${HOSTNAME_MEMBERS}
- EMAIL_SENDER=systems@${DOMAIN}
- MEMBERS_DB_PASSWORD
- APPLICATION_URL=https://${HOSTNAME_MEMBERS}
- REDIRECT_URLS=https://${HOSTNAME_ORDER}/f/
- VOKOMOKUM_CLIENT_SECRET
haproxy:
build: haproxy
restart: always
environment:
- HAPROXY_RELOAD_FILE=/triggers/reload-certs
- DOMAIN
- HOSTNAME_ORDER
- HOSTNAME_MEMBERS
ports:
- "80:80"
- "443:443"
volumes:
- certs:/certs:ro
- triggers:/triggers
mariadb:
image: mariadb:10.3
restart: always
environment:
- MYSQL_ROOT_PASSWORD
volumes:
- mariadb:/var/lib/mysql
phpmyadmin:
image: phpmyadmin/phpmyadmin
restart: always
environment:
- PMA_ABSOLUTE_URI=https://${HOSTNAME_ORDER}/phpmyadmin/
- PMA_HOST=mariadb
redis:
image: redis:3.2-alpine
restart: always
sharedlists:
image: foodcoops/sharedlists:latest
restart: always
environment:
- DATABASE_URL=mysql2://sharedlists:${SHAREDLISTS_DB_PASSWORD}@mariadb/sharedlists?encoding=utf8mb4
- SECRET_TOKEN=${SHAREDLISTS_SECRET_KEY_BASE}
- RAILS_RELATIVE_URL_ROOT=/sharedlists
- MAILER_DOMAIN=${DOMAIN}
- MAILER_PREFIX=sharedlists+
volumes:
- supplier_assets:/usr/src/app/supplier_assets
sharedlists_cron:
extends: sharedlists
command: ./proc-start cron
sharedlists_smtp:
extends: sharedlists
command: ./proc-start mail
environment:
- SMTP_SERVER_PORT=2525
- SMTP_SERVER_HOST=0.0.0.0
smtp:
build: smtp
restart: always
environment:
- DOMAIN
- HOSTNAME=${HOSTNAME_ORDER}
- DB_PASSWORD=${SMTP_DB_PASSWORD}
- POSTFIX_RELOAD_FILE=/triggers/reload-certs
- SMTP_ADDRESS
- SMTP_PORT
- SMTP_USER_NAME
- SMTP_PASSWORD
ports:
- "25:25"
volumes:
- certs:/certs:ro
- triggers:/triggers
- smtp:/var/spool/postfix
## See the section _Mail delivery_ in README.md for mail delivery testing.
#mailcatcher:
# image: tophfr/mailcatcher
# ports:
# - "1080:80"
volumes:
certs:
mariadb:
smtp:
supplier_assets:
triggers: