Skip to content

Instantly share code, notes, and snippets.

@felipyamorim
Created April 7, 2021 20:33
Show Gist options
  • Select an option

  • Save felipyamorim/cff21494a8a7304a428e29242e854742 to your computer and use it in GitHub Desktop.

Select an option

Save felipyamorim/cff21494a8a7304a428e29242e854742 to your computer and use it in GitHub Desktop.
reverse proxy
version: '3'
services:
webserver1:
image: php:7.2-apache
network_mode: bridge
expose:
- 80
- 443
environment:
VIRTUAL_HOST: web1.com.br
LETSENCRYPT_HOST: web1.com.br
volumes:
- $PWD/html:/var/www/html
version: '3'
services:
nginx-proxy:
image: jwilder/nginx-proxy
network_mode: bridge
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- /etc/certs:/etc/nginx/certs
- /etc/nginx/vhost.d:/etc/nginx/vhost.d
- /var/nginx/html:/usr/share/nginx/html
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
restart: unless-stopped
nginx-proxy-letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
depends_on:
- "nginx-proxy"
environment:
- DEFAULT_EMAIL=felipyamorim@gmail.com
- NGINX_PROXY_CONTAINER=nginx-proxy
volumes_from:
- nginx-proxy
restart: unless-stopped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment