generated from eea/volto-frontend-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
150 lines (126 loc) · 6.18 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
version: "3"
services:
frontend:
build: .
# image: eeacms/eea-website-frontend:develop
# image: cca-test
ports:
- "${FRONTEND:-3000}:3000"
environment:
RAZZLE_INTERNAL_API_PATH: "http://backend:8080/Plone"
RAZZLE_DEV_PROXY_API_PATH: "http://backend:8080/Plone"
volumes:
- ./src/addons:/app/src/addons
depends_on:
- backend
memcached:
# mem_limit: 73400320
image: memcached:1.5.12
environment:
TZ: Europe/Copenhagen
# mem_reservation: 52428800
command:
- -m
- '2048'
# labels:
# io.rancher.scheduler.affinity:host_label_ne: reserved=yes
backend:
#build: ./eea-website-backend/
# image: eeacms/eea.docker.plone-climateadapt:v9.105
image: eeacms/eea.docker.plone-climateadapt:latest
ports:
- "${BACKEND:-8080}:8080"
volumes:
- ./data:/data
- ./backend/src:/plone/instance/src
- ./eea.docker.plone-climateadapt/buildout.cfg:/plone/instance/buildout.cfg
# mem_limit: 4294967296
# mem_reservation: 4294967296
environment:
SITE: "cca"
TZ: Europe/Copenhagen
SERVER_NAME: climate-adapt.eea.europa.eu
MARINE_PASS: P7n3BLvCerm7cx3B
CORS_ALLOW_ORIGIN: "http://localhost:3000"
depends_on:
- memcached
converter:
image: tiberiuichim/blocks-conversion-tool:1.8
apache:
image: eeacms/apache:2.4-2.9
environment:
APACHE_CONFIG: |-
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName cca-local
ErrorLog /var/log/apache.log
# GZIP compression for text files: HTML, CSS, JS, Text, XML, fonts
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/tab-separated-values
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/octet-stream
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/json
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
</IfModule>
RewriteEngine On
ProxyPreserveHost On
# volto-cca
RewriteRule ^/mission$$ /en/mission [R=301,L]
RewriteRule ^/\+\+api\+\+(.*) http://backend:8080/VirtualHostBase/http/cca-local:80/cca/VirtualHostRoot/$$1 [P,L]
RewriteRule ^/static(.*) http://192.168.100.28:3000/static$$1 [P,L]
RewriteRule ^/_es(.*) http://192.168.100.28:3000/_es$$1 [P,L]
RewriteRule ^/en/mission(.*) http://192.168.100.28:3000/en/mission$$1 [P,L]
RewriteRule ^/en/observatory/resource-catalogue(.*) http://192.168.100.28:3000/en/observatory/resource-catalogue$$1 [P,L]
RewriteRule ^/en/resource-catalogue(.*) http://192.168.100.28:3000/en/resource-catalogue$$1 [P,L]
RewriteRule ^/en/next-data-and-download(.*) http://192.168.100.28:3000/en/next-data-and-download$$1 [P,L]
# fix some tinymce errors see task #156571
RewriteRule ^/(.*)\+\+resource\+\+plone\.app\.widgets\.tinymce(.*) http://backend:8080/VirtualHostBase/http/cca-local:80/cca/VirtualHostRoot/$$1$$2 [P,L]
RewriteRule ^/(en|de|fr|es|it|pl)$$ / [L,R=301]
RewriteRule ^/(en|de|fr|es|it|pl)/$$ / [L,R=301]
RewriteRule ^/data-and-downloads/$$ /en/data-and-downloads/ [L,R=301]
RewriteRule ^/(en|de|fr|es|it|pl)/data-and-downloads/(.*) http://search-app:3000/$$2 [P,L]
RewriteRule ^/(en|de|fr|es|it|pl)/data-and-downloads /data-and-downloads/ [L,R=301]
RewriteRule ^/(en|de|fr|es|it|pl)/dataanddownloads/(.*) http://search-app:3000/$$2 [P,L]
RewriteRule ^/(en|de|fr|es|it|pl)/observatory/catalogue/(.*) http://health-catalog-app:3000/$$2 [P,L]
# from demo website
# RewriteRule ^/data-and-downloads$$ https://climate-adapt.eea.europa.eu/data-and-downloads/ [L,R=301]
# RewriteRule ^/observatory/catalogue$$ https://climate-adapt.eea.europa.eu/observatory/catalogue/ [L,R=301]
# Main search engine
# RewriteRule ^/data-and-downloads/(.*) http://search-app:3000/$$$$1 [P,L]
# Health catalogue search engine
# RewriteRule ^/observatory/catalogue/(.*) http://health-catalog-app:3000/$$$$1 [P,L]
# Needed
RewriteRule /esbootstrap_resources/(.*) http://health-catalog-app:3000/esbootstrap_resources/$$1 [P]
RewriteRule /search-images/(.*) http://health-catalog-app:3000/search-images/$$1 [P]
RewriteRule /fonts-search/(.*) http://health-catalog-app:3000/fonts-search/$$1 [P]
RewriteRule ^/(.*data\-and\-downloads.*) http://search-app:3000/$$$$1 [P]
RewriteRule /frontpage/(.*data\-and\-downloads.*) http://search-app:3000/$$$$1 [P]
RewriteRule ^/(.*) http://backend:8080/VirtualHostBase/http/cca-local:80/cca/VirtualHostRoot/$$1 [P,L]
# # ported from the ca-proxy server, not sure this is needed
# # Comment on that server was "For the background map"
RewriteRule ^/ve/(.*) http://dev.virtualearth.net/$$1 [P]
ProxyPassReverse /ve http://dev.virtualearth.net/
</VirtualHost>
APACHE_CONFIG_URL_OLD: https://raw.githubusercontent.com/eea/eea.docker.climateadapt/master/apache/vh-cca-https.conf?bust=7
TZ: Europe/Copenhagen
stdin_open: true
tty: true
ports:
- "80:80"