Created
July 9, 2024 00:57
-
-
Save parrotmac/a06899da53aee5f8a236fc461669f6c7 to your computer and use it in GitHub Desktop.
Automatic Virtual Hosts w/ TLS (see https://github.com/parrotmac/inox/blob/34665734e15bb9b706186d878153d483086a2e64/docker-compose.yaml as example usage)
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: '2' | |
services: | |
proxy: | |
restart: always | |
image: jwilder/nginx-proxy:alpine | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: | |
- ./certs/:/etc/nginx/certs:ro | |
- /etc/nginx/vhost.d | |
- /usr/share/nginx/html | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
- ./vhost:/etc/nginx/vhost.d | |
container_name: nginx-proxy | |
networks: | |
- default | |
- nginx-proxy | |
letsencrypt: | |
restart: always | |
image: jrcs/letsencrypt-nginx-proxy-companion | |
volumes: | |
- ./certs/:/etc/nginx/certs:rw | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
volumes_from: | |
- proxy | |
container_name: letsencrypt | |
networks: | |
- default | |
- nginx-proxy | |
networks: | |
nginx-proxy: | |
external: | |
name: nginx-proxy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment