Based on this article : https://francoisromain.medium.com/host-multiple-websites-with-https-inside-docker-containers-on-a-single-server-18467484ab95
Create a nginx-proxy directory next to the websites directories.
/home/ubuntu/oag-reverse-proxy/nginx-proxy
First create the network:
$ docker network create nginx-proxy
Then create the reverse proxy with the nginx, nginx-gen and nginx-letsencrypt containers from the docker-compose.yml file:
$ cd /home/ubuntu/oag-reverse-proxy/nginx-proxy $ docker-compose up -d
- issue :
Unable to parse template: read /etc/docker-gen/templates/nginx.tmpl: is a directory
added directory
/home/ubuntu/oag-reverse-proxy/nginx-proxy/templates
changed line on docker-compose.yml
/home/ubuntu/oag-reverse-proxy/nginx-proxy/templates:/etc/docker-gen/templates:ro
run by typing :
sudo docker-compose up -d
- contains the fastapi web site for oneagegroup.com
- contains the fastapi web site for catesdb.oneagegroup.com
- contains the docker compose file to launch the whole setup
- will be launched from the docker compose file
cd oag_site_web
sudo docker build -t oag-com .
image : oag-com:latest
- will be launched from the docker compose file
cd class_management_app
sudo docker build -t class-management .
image : class-management:latest