Skip to content

Docker reverse proxy script for handling multiple docker http-containers on the same host.

License

Notifications You must be signed in to change notification settings

HalloSouf/docker-reverse-nginx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Reverse docker proxy

In this example, I created a simple docker-compose file to setup a nginx reverse proxy. When a reverse proxy receives a request, the proxy will emits this request to the configured application. This gives the ability to run multiple http-docker containers on the same host.

Add application to config 🛠️

If you want to add new applictions to your reverse proxy, you need to add them in your docker-compose.yml. You can add an application to your reverse proxy, like the example below. We added here a Discord client API.

  discord-client-api:                       # Image for current Docker container for your application
    image: client-api:latest                # The Docker image which needs to be runned
    container_name: discord-client-api      # Container name of current image (Same as service name)
    restart: always                         # Always restart on failure for example

Installation 📦

The first step you need to execute, is cloning this repository with the following command:

git clone https://github.com/HalloSouf/docker-reverse-nginx.git

After you added your applications to the docker-compose, you are able to start your reverse proxy.

docker compose up -d

License 📜

MIT

About

Docker reverse proxy script for handling multiple docker http-containers on the same host.

Topics

Resources

License

Stars

Watchers

Forks