https://github.com/jvillegasd/nginx_certbot_reverse_proxy_docker
Containers cluster hosting using Nginx and Certbot
https://github.com/jvillegasd/nginx_certbot_reverse_proxy_docker
Last synced: 4 months ago
JSON representation
Containers cluster hosting using Nginx and Certbot
- Host: GitHub
- URL: https://github.com/jvillegasd/nginx_certbot_reverse_proxy_docker
- Owner: jvillegasd
- Created: 2020-05-24T23:55:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-25T03:12:55.000Z (over 5 years ago)
- Last Synced: 2025-06-16T19:22:16.109Z (4 months ago)
- Homepage:
- Size: 4.88 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nginx_certbot_reverse_proxy_Docker
Container cluster hosting using Nginx and Certbot.
This YML allows you to expose containers to the internet using SSL certificates from Certbot (LetsEncrypt) using Nginx as reverse proxy.## Usage
To run the cluster, ensure to execute the following commands:
```
docker network create nginx-proxy
docker-compose up -d
```## How to expose containers
For expose your containers, you have to add some stuff in you `docker-compose` file in order to `docker-gen` container creates the new virtual host for your web app.```
version: 3.7services:
some_service_you_want_to_expose:
...
expose:
- (put the port you want the container to use)
environment:
VIRTUAL_HOST: domain or subdomain to use
LETSENCRYPT_HOST: domain or subdomain to use
LETSENCRYPT_EMAIL: email to use
...
networks:
default:
external:
name: nginx-proxy
```## Credits
This docker-compose was made using this [tutorial](https://blog.ssdnodes.com/blog/host-multiple-ssl-websites-docker-nginx/)