Skip to content

jvillegasd/Nginx_certbot_reverse_proxy_Docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

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.7

services:
  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

About

Containers cluster hosting using Nginx and Certbot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published