Skip to content

Instantly share code, notes, and snippets.

@dariok
Created May 23, 2022 14:36
Show Gist options
  • Save dariok/6fd4aa86ecf8f34754213f5e1a7b2b3a to your computer and use it in GitHub Desktop.
Save dariok/6fd4aa86ecf8f34754213f5e1a7b2b3a to your computer and use it in GitHub Desktop.
docker-compose: eXist + nginx
server {
listen 80;
server_name exist.localhost;
location / {
return 301 https://exist.localhost$request_uri;
}
}
server {
listen 443 ssl http2;
server_name exist.localhost;
ssl_certificate localhost.crt;
ssl_certificate_key localhost.key;
ssl_ciphers HIGH:!aNULL:!MD5;
location /exist/rconsole {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass https://wdbplus:8443/exist/rconsole;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_cache off;
}
location / {
proxy_pass https://wdbplus:8443;
add_header X-ULB-Devel "e2";
proxy_set_header X-ULB-Devel "2e";
proxy_cookie_path ~*^/.* /;
}
}
version: '3.7'
services:
wdbplus:
build: .
container_name: wdbplus
hostname: wdbplus
ports:
- 8080:8080
- 8443:8443
volumes:
- $PWD/existdb/logs:/exist/logs
- $PWD/../edoc:/extension
mem_limit: 6G
nginx:
image: nginx:latest
container_name: nginx
volumes:
- $PWD/nginx/localhost.crt:/etc/nginx/localhost.crt
- $PWD/nginx/localhost.key:/etc/nginx/localhost.key
- $PWD/nginx/default.conf:/etc/nginx/conf.d/default.conf
ports:
- 80:80
- 443:443
FROM existdb/existdb:latest
ENV EXIST_HOME /exist
COPY existdb/etc/conf.xml /exist/etc/
COPY existdb/etc/controller.xml /exist/etc/webapp/WEB-INF
COPY existdb/autodeploy/*.xar /exist/autodeploy/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment