diff options
author | Malfurious <m@lfurio.us> | 2022-08-14 06:48:45 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2022-08-14 06:48:45 -0400 |
commit | 01a74ddef01d885dd6e4a615ea120137aec0afc6 (patch) | |
tree | b71f98ca8fabcb04901ece1e6ce4ffdbeccab557 | |
download | proxy-docker-01a74ddef01d885dd6e4a615ea120137aec0afc6.tar.gz proxy-docker-01a74ddef01d885dd6e4a615ea120137aec0afc6.zip |
Initial version of docker-compose
Setup for a basic site hosting an HTTP reverse proxy with automated TLS
certificate issuance via lets-encrypt.
Content taken from https://linuxhandbook.com/nginx-reverse-proxy-docker/
Signed-off-by: Malfurious <m@lfurio.us>
-rw-r--r-- | docker-compose.yml | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..7ac3eb9 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,45 @@ +version: "3.7" + +services: + + reverse-proxy: + image: "jwilder/nginx-proxy:latest" + container_name: "reverse-proxy" + volumes: + - "html:/usr/share/nginx/html" + - "dhparam:/etc/nginx/dhparam" + - "vhost:/etc/nginx/vhost.d" + - "certs:/etc/nginx/certs" + - "/run/docker.sock:/tmp/docker.sock:ro" + restart: "always" + networks: + - "net" + ports: + - "80:80" + - "443:443" + letsencrypt: + image: "jrcs/letsencrypt-nginx-proxy-companion:latest" + container_name: "letsencrypt-helper" + volumes: + - "html:/usr/share/nginx/html" + - "dhparam:/etc/nginx/dhparam" + - "vhost:/etc/nginx/vhost.d" + - "certs:/etc/nginx/certs" + - "/run/docker.sock:/var/run/docker.sock:ro" + environment: + NGINX_PROXY_CONTAINER: "reverse-proxy" + DEFAULT_EMAIL: "user@domain.com" + restart: "always" + depends_on: + - "reverse-proxy" + networks: + - "net" +volumes: + certs: + html: + vhost: + dhparam: + +networks: + net: + external: true |