Skip to content

Latest commit

 

History

History
61 lines (39 loc) · 1.35 KB

README.md

File metadata and controls

61 lines (39 loc) · 1.35 KB

ekyna/docker-nginx-proxy

Usage

  1. Clone this repo:

     git clone https://github.com/ekyna/docker-nginx-proxy.git proxy
     cd ./proxy
    
  2. Copy .env.dist to .env and provide environment variables:

     REGISTRY_VERSION=2.7.1
     REGISTRY_SECRET=0123456789
     REGISTRY_HOST=registry.example.org  # FQDN (used by proxy/letsencrypt)
     REGISTRY_PORT=5000
     REGISTRY_EMAIL=registry@example.org # Email for letsencrypt
    
  3. Launch the proxy:

     ./manage.sh up
    
  4. Configure your website:

    docker compose example

     version: '3'
    
     services:
       example:
         image: your-web-server
         environment:
           VIRTUAL_HOST: www.example.com
           VIRTUAL_NETWORK: example-network
           VIRTUAL_PORT: 80
           LETSENCRYPT_HOST: www.example.com
           LETSENCRYPT_EMAIL: email@example.com
    
  5. Run your website:

    cd ./example-website
    docker-compose up -d 
    

Registry

This repo embed a private secured (with letsencrypt) docker registry.

Create a user for authentication:

./manage.sh create-user <user> <password>

Launch the proxy:

./manage.sh registry up

Resources: