This repository presents a simple docker-compose to use to provide access to web apps with docker.
- Install docker
- Clone this repository:
https://github.com/swisscat/nginx-proxy.git
- Create the default network:
docker network create nginx-proxy
- Go to the cloned repository, execute
docker-compose up -d
To expose a new application to the web, open the corresponding docker-compose.yml
and
- Ensure the ports in the container are exposed (but not binded)
- Append to the container you wish to expose:
environment:
VIRTUAL_HOST: my-app.my.domain
LETSENCRYPT_HOST: my-app.my.domain
LETSENCRYPT_EMAIL: my-emailaddress.com
- Append as well
networks:
default:
external:
name: nginx-proxy