1
0
mirror of https://git.fsfe.org/fsfe-system-hackers/reverse-proxy synced 2025-01-31 15:31:38 +01:00
reverse-proxy/docker-compose.yml

68 lines
1.7 KiB
YAML

version: '3'
services:
rp:
container_name: rp
build:
context: rp
image: rp
network_mode: "bridge"
restart: always
ports:
- "80:80"
- "443:443"
environment:
- ERROR_WEBSITE=error.fsfe.org
- ENABLE_IPV6=true
volumes:
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "/srv/nginx-rp/certs:/etc/nginx/certs:ro"
- "/srv/nginx-rp/html:/usr/share/nginx/html"
- "/srv/nginx-rp/conf.d:/etc/nginx/conf.d"
labels:
"com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy": "true"
logging:
driver: json-file
options:
max-size: "5m"
max-file: "5"
depends_on:
- rp-errorpage
- connect-bridge
rp-letsencrypt:
container_name: rp-letsencrypt
image: jrcs/letsencrypt-nginx-proxy-companion:v1.13
restart: always
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "/srv/nginx-rp/vhost:/etc/nginx/vhost.d"
- "/srv/nginx-rp/html:/usr/share/nginx/html"
- "/srv/nginx-rp/certs:/etc/nginx/certs:rw"
environment:
- NGINX_PROXY_CONTAINER=rp
depends_on:
- rp
rp-errorpage:
container_name: rp-errorpage
build:
context: errorpage
image: rp-errorpage
expose:
- 80
restart: always
environment:
- VIRTUAL_HOST=error.fsfe.org
- LETSENCRYPT_HOST=error.fsfe.org
- LETSENCRYPT_EMAIL=contact@fsfe.org
# Connect the container which exposes the service to the 'bridge' network as
# this is where the reverse proxy is
connect-bridge:
image: docker:dind
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- rp-errorpage
command: /bin/sh -c 'docker network connect bridge rp-errorpage'