Last active
November 24, 2020 19:58
-
-
Save wilcorrea/903691dc54697f689fea9b9a2963b5f5 to your computer and use it in GitHub Desktop.
Docker Compose para manter
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: '3.7' | |
# make sure everything is running with: | |
# docker ps --format "table {{.ID}}\t{{.Names}}\t{{.Ports}}\t{{.Status}}" | grep "nginx-" | |
#networks | |
networks: | |
#network reverse-proxy | |
reverse-proxy: | |
external: true | |
name: reverse-proxy | |
#services | |
services: | |
#service nginx-proxy | |
nginx-proxy: | |
image: jwilder/nginx-proxy | |
container_name: nginx-proxy | |
restart: unless-stopped | |
networks: | |
- reverse-proxy | |
volumes: | |
- $HOME/certs:/etc/nginx/certs:ro | |
- /etc/nginx/vhost.d:/etc/nginx/vhost.d | |
- /usr/share/nginx/html:/usr/share/nginx/html | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
ports: | |
- 80:80 | |
- 443:443 | |
#service nginx-letsencrypt | |
nginx-letsencrypt: | |
image: jrcs/letsencrypt-nginx-proxy-companion | |
container_name: nginx-letsencrypt | |
restart: unless-stopped | |
depends_on: | |
- nginx-proxy | |
networks: | |
- reverse-proxy | |
volumes: | |
- $HOME/certs:/etc/nginx/certs:rw | |
- /etc/nginx/vhost.d:/etc/nginx/vhost.d | |
- /usr/share/nginx/html:/usr/share/nginx/html | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
environment: | |
- NGINX_PROXY_CONTAINER=nginx-proxy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment