forked from foodcoops/foodcoops.net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
137 lines (122 loc) · 3.46 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
version: '2'
services:
certbot:
image: foodcoops/certbot:latest
restart: always
environment:
CERTBOT_DOMAINS: |-
${DOMAIN},www.${DOMAIN}
app.${DOMAIN}
CERTBOT_EMAIL: admin@${DOMAIN}
CERTBOT_TOUCH_FILE: /triggers/reload-certs
CERTBOT_DISABLED: ${CERTBOT_DISABLED}
volumes:
- certs:/certs
- triggers:/triggers
foodsoft:
build: foodsoft
restart: always
environment:
- DATABASE_URL=mysql2://foodsoft:${FOODSOFT_DB_PASSWORD}@mariadb/foodsoft_demo?encoding=utf8mb4
- EMAIL_SENDER=noreply@${DOMAIN}
- HOSTNAME=app.${DOMAIN}
- 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
- MAILER_PREFIX=foodsoft+
- SMTP_DOMAIN=app.${DOMAIN}
- SMTP_ADDRESS
- SMTP_PORT
- SMTP_USER_NAME
- SMTP_PASSWORD
- ERROR_RECIPIENTS
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
# foodsoft_latest:
# build: foodsoft-latest
# restart: always
# environment:
# - DATABASE_URL=mysql2://foodsoft_latest:${FOODSOFT_LATEST_DB_PASSWORD}@mariadb/foodsoft_latest?encoding=utf8mb4
# - EMAIL_SENDER=noreply@${DOMAIN}
# - HOSTNAME=app.${DOMAIN}
# - QUEUE=foodsoft_latest_notifier
# - REDIS_URL=redis://redis:6379
# - SECRET_KEY_BASE=${FOODSOFT_LATEST_SECRET_KEY_BASE}
# - SHAREDLISTS_DATABASE_URL=mysql2://foodsoft_latest:${FOODSOFT_LATEST_DB_PASSWORD}@mariadb/sharedlists?encoding=utf8mb4
# - RAILS_RELATIVE_URL_ROOT=/latest
# # - LATEST_ERROR_RECIPIENTS
haproxy:
build: haproxy
restart: always
environment:
- HAPROXY_RELOAD_FILE=/triggers/reload-certs
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://app.${DOMAIN}/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=app.${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=app.${DOMAIN}
- HOSTNAME=app.${DOMAIN}
- POSTFIX_RELOAD_FILE=/triggers/reload-certs
ports:
- "25:25"
volumes:
- certs:/certs:ro
- triggers:/triggers
volumes:
certs:
mariadb:
supplier_assets:
triggers: