-
-
Notifications
You must be signed in to change notification settings - Fork 403
/
Copy pathdocker-compose.yml
121 lines (110 loc) · 3.42 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
version: "3.7"
x-backend-conf: &backend-conf
image: ghcr.io/openfoodfacts/openfoodfacts-server/backend:${TAG}
environment:
- PRODUCERS_PLATFORM
- PRODUCT_OPENER_DOMAIN
- PRODUCT_OPENER_PORT
- PRODUCT_OPENER_FLAVOR
- PRODUCT_OPENER_FLAVOR_SHORT
- MONGODB_HOST
- POSTGRES_HOST
- POSTGRES_USER
- POSTGRES_PASSWORD
- ROBOTOFF_URL
- EVENTS_URL
- EVENTS_USERNAME
- EVENTS_PASSWORD
- GOOGLE_CLOUD_VISION_API_KEY
- CROWDIN_PROJECT_IDENTIFIER
- CROWDIN_PROJECT_KEY
- GEOLITE2_PATH
- LOG_LEVEL_ROOT
- LOG_LEVEL_MONGODB
- INFLUXDB_HOST
depends_on:
- memcached
volumes:
# pointer to openfoodfacts-web/lang
- ${WEB_LANG_PATH}:/mnt/podata/lang
# Static data (e.g dumps)
- html_data:/opt/product-opener/html/data
# Binds from frontend container (read-only)
- icons_dist:/opt/product-opener/html/images/icons/dist:ro
- js_dist:/opt/product-opener/html/js/dist:ro
- css_dist:/opt/product-opener/html/css/dist:ro
- node_modules:/opt/product-opener/node_modules:ro
# Users, products, product images and orgs files
- users:/mnt/podata/users # .sto
- products:/mnt/podata/products # .sto
- product_images:/opt/product-opener/html/images/products # .jpg
- orgs:/mnt/podata/orgs # .sto
# all the rest
- podata:/mnt/podata
# Logs
- ./logs/apache2:/var/log/apache2
- ./logs/apache2:/mnt/podata/logs
- ./logs/apache2:/var/log/httpd
# Apache conf
- ./conf/apache.conf:/etc/apache2/sites-enabled/product-opener.conf
- ./conf/apache-mpm_prefork.conf:/etc/apache2/mods-avalable/mpm_prefork.conf
services:
memcached:
image: memcached:1.6-alpine
postgres:
image: postgres:12-alpine
# we want postgres for off, but not for pro profile
profiles: ["off"]
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB=minion
volumes:
- pgdata:/var/lib/postgresql/data
backend: *backend-conf
minion:
<<: *backend-conf
# This service run the minion, see https://docs.mojolicious.org/Minion/
command:
- "/opt/product-opener/scripts/minion_producers.pl"
- "minion"
- "worker"
- "-m"
- "$MINION_MODE"
- "-q"
- "$MINION_QUEUE"
incron:
<<: *backend-conf
# This service run the incron jobs
# Only root can run incron
user: root
command: ["incrond", "-n"]
frontend:
image: ghcr.io/openfoodfacts/openfoodfacts-server/frontend:${TAG}
depends_on:
- backend
environment:
- PRODUCT_OPENER_DOMAIN
volumes:
- product_images:/opt/product-opener/html/images/products:ro
- html_data:/opt/product-opener/html/data:ro
- ./html/donate:/opt/product-opener/html/donate:ro
# Static dist/ assets (JS, CSS, Icons, Image attributes) generated by gulp
# if you add a volume, add it to dev.yml / dynamicfront
- icons_dist:/opt/product-opener/html/images/icons/dist
- js_dist:/opt/product-opener/html/js/dist
- css_dist:/opt/product-opener/html/css/dist
# Logs
- ./logs/nginx/:/var/log/nginx/
# Nginx, we use templates dir to be able to use environment vars
- ./conf/nginx.conf:/etc/nginx/templates/default.conf.template
# Node modules
- node_modules:/opt/product-opener/node_modules
ports:
- ${PRODUCT_OPENER_EXPOSE}${PRODUCT_OPENER_PORT}:80
volumes:
pgdata:
icons_dist:
js_dist:
css_dist:
node_modules: