Skip to content

Instantly share code, notes, and snippets.

@abhishekpc
Last active November 16, 2021 05:45
Show Gist options
  • Save abhishekpc/b2a7560d534029d389412bf2d9dae9fa to your computer and use it in GitHub Desktop.
Save abhishekpc/b2a7560d534029d389412bf2d9dae9fa to your computer and use it in GitHub Desktop.
The docker compose file for Ngnix reverse proxy set up
version: "3.3"
services:
NginxProxy:
image: "jwilder/nginx-proxy:latest"
volumes:
- "NPhtml:/usr/share/nginx/html"
- "NPdhparam:/etc/nginx/dhparam"
- "NPvhost:/etc/nginx/vhost.d"
- "NPcerts:/etc/nginx/certs:ro"
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "./client_max_upload_size.conf:/etc/nginx/conf.d/client_max_upload_size.conf"
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
restart: "on-failure"
networks: ["net"]
ports:
- "80:80"
- "443:443"
LetsencryptCompanion:
image: "jrcs/letsencrypt-nginx-proxy-companion:latest"
volumes:
- "LCacme:/etc/acme.sh"
- "NPvhost:/etc/nginx/vhost.d"
- "NPcerts:/etc/nginx/certs"
- "NPhtml:/usr/share/nginx/html"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
environment:
- DEFAULT_EMAIL
depends_on: ["NginxProxy"]
restart: "on-failure"
networks: ["net"]
volumes:
NPhtml:
NPdhparam:
NPvhost:
NPcerts:
LCacme:
networks:
net:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment