diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml new file mode 100644 index 0000000..1b50287 --- /dev/null +++ b/docker-compose-dev.yml @@ -0,0 +1,180 @@ +version: "2.1" + +services: + esproxy: + image: tiberiuichim/wise-catalogue-proxy + environment: + PROXY_ES_DSN: http://elastic2:9200/wise_catalogue_measures/ + stdin_open: true + tty: true + ports: + - 7000:7000/tcp + labels: + io.rancher.container.pull_image: always + io.rancher.scheduler.affinity:host_label_ne: reserved=yes + elastic2: + cap_add: + - IPC_LOCK + image: eeacms/elastic:7.16-1.0 + environment: + cluster.name: elastic7 + node.name: elastics7_standalone + discovery.type: single-node + xpack.security.enabled: 'false' + name: elastic7 + ES_JAVA_OPTS: "-Xms750m -Xmx750m" + stdin_open: true + volumes: + - ./elastic-data:/usr/share/elasticsearch/data + tty: true + ports: + - 9200:9200/tcp + labels: + io.rancher.container.pull_image: always + + plone: + image: eeacms/marine-backend:1.45.0 + volumes: + - ./marine-frontend/backend/src/plone/site.cfg:/plone/instance/site.cfg + - ./src/:/plone/instance/src + - ./data-p5-assess2/envvbar_a:/data/MSFDXML + ports: + - "${BACKEND_PORT:-8085}:8080" + environment: + MSFD_db_2018: MSFD2018_public + MSFD_db_default: MarineDB_public + MSFDXML: "/data/MSFDXML" + ZOPE_MODE: "zeo_client" + ZEO_ADDRESS: "zeo:8080" + CORS_ALLOW_ORIGIN: "http://localhost:3000,http://localhost:3001" + USE_MOCKSESSION: "True" + entrypoint: sh -c "tail -f /dev/null" + depends_on: + - zeo + - memcached + + zeo: + image: eeacms/marine-backend:1.45.0 + environment: + TZ: "Europe/Copenhagen" + ZOPE_MODE: "zeo" + command: + - zeo + volumes: + - ./data-test-2023-apr-19/data-marine-backend/:/data + + memcached: + image: memcached:1.4.35 + labels: + io.rancher.scheduler.affinity:host_label_ne: reserved=yes + environment: + TZ: "Europe/Copenhagen" + command: + - -m + - "2048" + - -I + - '20m' + + marine-frontend: + image: eeacms/marine-frontend:1.9.0.eea-design.03 + # image: laszlocseh/marine-frontend:1.1.0.local + environment: + PORT: '3000' + RAZZLE_ALLOWED_CORS_DESTINATIONS: http://wise-localhost.com,http://localhost:3000,https://wise-localhost.com + TZ: Europe/Copenhagen + API_PATH: http://wise-localhost.com/marine + RAZZLE_API_PATH: http://wise-localhost.com/marine + PUBLIC_PATH: http://wise-localhost.com/marine/ + RAZZLE_PROXY_ES_DSN: http://elastic2:9200/wise_catalogue_measures + # RAZZLE_PREFIX_PATH: '/marine' + # RAZZLE_INTERNAL_API_PATH: 'http://wise-localhost.com/marine' + # RAZZLE_PUBLIC_DIR: '/marine/' + # RAZZLE_DEV_PROXY_API_PATH: http://wise-localhost.com/marine + # volumes: + # - ./marine-frontend/node_modules/razzle/packages/razzle:/opt/frontend/node_modules/razzle + # - ./marine-frontend/src/addons/volto-marine-theme:/opt/frontend/src/addons/volto-marine-theme + # - ./marine-frontend/jsconfig.json:/opt/frontend/jsconfig.json + # user: 'node:node' + links: + - plone:backend + ports: + - '3000:3000' + - '3001:3001' + - '8888:8888' + entrypoint: sh -c "tail -f /dev/null" + + apache: + image: eeacms/apache:latest + ports: + - "80:80" + environment: + APACHE_CONFIG: |- + + ServerAdmin helpdesk@wise-localhost.com + ServerName wise-localhost.com + + ErrorLog /var/log/apache.log + + RewriteEngine On + SSLProxyEngine on + + Header set Access-Control-Allow-Origin "http://wise-localhost.com" + Header set Access-Control-Allow-Credentials "true" + + ProxyTimeout 1800 + Timeout 1800 + + Redirect "/geonetwork" "/geonetwork/" + #RewriteRule ^/geonetwork/(.*) http://wise-geonetwork:8080/geonetwork/$$1 [P,L,QSA] + RewriteRule ^/geonetwork/(.*) http://wise-geonetwork-webapp:8080/geonetwork/$$1 [P,L,QSA] + RewriteRule ^/old-geonetwork/(.*) http://wise-geonetwork-webapp:8080/old-geonetwork/$$1 [P,L,QSA] + + # Marine-new test + # assessment module and country profile to plone 5 + RewriteRule ^/(.*)marine/countries-and-regional-seas/country-profiles(.*) http://plone:8080/VirtualHostBase/http/wise-localhost.com:80/Plone/VirtualHostRoot/marine/countries-and-regional-seas/country-profiles$$2 [P,L] + RewriteRule ^/(.*)marine/assessment-module(.*) http://plone:8080/VirtualHostBase/http/wise-localhost.com:80/Plone/VirtualHostRoot/marine/assessment-module$$2 [P,L] + RewriteRule ^/\+\+theme\+\+wise-theme(.*) http://plone:8080/VirtualHostBase/http/wise-localhost.com:80/Plone/VirtualHostRoot/++theme++wise-theme$$1 [P,L] + # fix MSFD reporting data explorer export to excel + RewriteRule ^/(marine/)+(api/\+\+api\+\+/)+(.*) http://plone:8080/VirtualHostBase/http/wise-localhost.com:80/Plone/VirtualHostRoot/marine/$$3 [P,L] + # fix MSFD search article select + # RewriteRule ^/(marine/)+(api/)?\+\+api\+\+/msfd-mru(.*) http://plone:8080/VirtualHostBase/http/wise-localhost.com:80/Plone/VirtualHostRoot/_vh_marine/marine/msfd-marine-units$$3 [P,L] + # marine-api to access plone + RewriteRule ^/(.*)/marine/\+\+plone\+\+(.*) http://plone:8080/VirtualHostBase/http/wise-localhost.com:80/Plone/VirtualHostRoot/$$1 [P,L] + RewriteRule ^/marine-api(.*) http://plone:8080/VirtualHostBase/http/wise-localhost.com:80/Plone/VirtualHostRoot/_vh_marine-api$$1 [P,L] + RewriteRule ^/marine/\+\+plone\+\+(.*) http://plone:8080/VirtualHostBase/http/wise-localhost.com:80/Plone/VirtualHostRoot/$$1 [P,L] + RewriteRule ^/marine/\+\+theme\+\+(.*) http://plone:8080/VirtualHostBase/http/wise-localhost.com:80/Plone/VirtualHostRoot/$$1 [P,L] + #marine frontend rules + #rules for @user, @login, /static are needed so we can have the site root at the /marine folder + RewriteRule ^/marine\/\+\+api\+\+\/\@system(.*) http://plone:8080/VirtualHostBase/http/wise-localhost.com:80/Plone/VirtualHostRoot/@system$$1 [P,L] + RewriteRule ^/marine\/\+\+api\+\+\/\@controlpanels(.*) http://plone:8080/VirtualHostBase/http/wise-localhost.com:80/Plone/VirtualHostRoot/@controlpanels$$1 [P,L] + RewriteRule ^/marine\/\+\+api\+\+\/\@users(.*) http://plone:8080/VirtualHostBase/http/wise-localhost.com:80/Plone/VirtualHostRoot/@users$$1 [P,L] + RewriteRule ^/marine\/\+\+api\+\+\/\@login(.*) http://plone:8080/VirtualHostBase/http/wise-localhost.com:80/Plone/VirtualHostRoot/@login$$1 [P,L] + RewriteRule ^/marine/login(.*) http://plone:8080/VirtualHostBase/http/wise-localhost.com:80/Plone/VirtualHostRoot/marine/login$$1 [P,L] + RewriteRule ^/marine/static(.*) http://marine-frontend:3000/static$$1 [P,L] + RewriteRule ^/marine\/\+\+api\+\+(.*) http://plone:8080/VirtualHostBase/http/wise-localhost.com:80/Plone/VirtualHostRoot/_vh_marine/marine$$1 [P,L] + RewriteRule ^/marine(.*) http://marine-frontend:3000/marine$$1 [P,L] + + + # Freshwater + # Fixing http://water.ro/api/++api++/freshwater/@navigation?expand.navigation.depth=1 + RewriteRule ^/static(.*) http://freshwater-frontend:3000/static/$$1 [P,L] + RewriteRule ^/freshwater\/\@search(.*) http://freshwater-backend:8080/VirtualHostBase/https/wise-localhost.com:443/Plone/VirtualHostRoot/_vh_api/\+\+api\+\+$$1 [P,L] + RewriteRule ^/api/\+\+api\+\+\/freshwater(.*) http://freshwater-backend:8080/VirtualHostBase/https/wise-localhost.com:443/Plone/VirtualHostRoot/_vh_freshwater$$1 [P,L] + RewriteRule ^/api(.*) http://freshwater-backend:8080/VirtualHostBase/https/wise-localhost.com:443/Plone/VirtualHostRoot/_vh_api$$1 [P,L] + RewriteRule ^/freshwater(.*) http://freshwater-frontend:3000/$$1 [P,L] + + # Fixing cards image from https://wise-localhost.com/freshwater/data-maps-and-tools/water-framework-directive-surface-water-data-products/surface-water-chemical-status + RewriteRule ^/resolveuid(.*) http://freshwater-frontend:3000/resolveuid/$$1 [P,L] + + # compliance goes to p4 + RewriteRule ^/\+\+theme\+\+wise-theme\/(.*) http://haproxyp5:5000/VirtualHostBase/http/wise-localhost.com:443/Plone/VirtualHostRoot/_vh_marine/++theme++wise-theme/$$1 [P,L] + RewriteRule ^/\+\+plone\+\+privacyscreen\/(.*) http://haproxyp5:5000/VirtualHostBase/http/wise-localhost.com:443/Plone/VirtualHostRoot/_vh_marine/++plone++privacyscreen/$$1 [P,L] + + # new marine website goes to p5 + RewriteRule ^/marine/site-root(.*) http://plone:8080/VirtualHostBase/http/wise-localhost.com:80/Plone/VirtualHostRoot/_vh_marine/site-root/$$1 [P,L] + RewriteRule ^/marine(.*) http://plone:8080/VirtualHostBase/http/wise-localhost.com:80/Plone/VirtualHostRoot/_vh_marine$$1 [P,L] + + # frontpage goes to p4 + RewriteRule ^/(.*) http://plone:8080/VirtualHostBase/http/wise-localhost.com:80/Plone/VirtualHostRoot/_vh_marine/site-root/$$1 [P,L] + + \ No newline at end of file