Created
October 6, 2022 12:21
-
-
Save oscarfonts/a77fd11db404da15458db0ff0c59f081 to your computer and use it in GitHub Desktop.
Compose Geoserver + SSL proxy using letsencrypt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.9' | |
services: | |
proxy: | |
image: nginxproxy/nginx-proxy:1.0.1-alpine | |
restart: always | |
container_name: base-proxy | |
ports: | |
- 80:80 | |
- 443:443 | |
labels: | |
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true" | |
volumes: | |
- /srv/base/proxy/certs:/etc/nginx/certs:ro | |
- /srv/base/proxy/vhost.d:/etc/nginx/vhost.d | |
- /srv/base/proxy/html:/usr/share/nginx/html | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
networks: | |
- proxy-tier | |
letsencrypt-companion: | |
image: jrcs/letsencrypt-nginx-proxy-companion | |
restart: always | |
container_name: base-letsencrypt | |
volumes: | |
- /srv/base/proxy/certs:/etc/nginx/certs | |
- /srv/base/proxy/vhost.d:/etc/nginx/vhost.d | |
- /srv/base/proxy/html:/usr/share/nginx/html | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
networks: | |
- proxy-tier | |
depends_on: | |
- proxy | |
geoserver: | |
image: oscarfonts/geoserver:2.21.1 | |
container_name: geoserver | |
environment: | |
- LETSENCRYPT_HOST=midomain.com | |
- LETSENCRYPT_EMAIL=micorreo@lalala.com | |
- VIRTUAL_HOST=midomain.com | |
- VIRTUAL_PORT=8080 | |
volumes: | |
- /opt/geoserver_data_dir:/var/local/geoserver | |
restart: always | |
networks: | |
- base-proxy | |
volumes: | |
certs: | |
vhost.d: | |
html: | |
networks: | |
proxy-tier: | |
name: base-proxy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment