Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hacfi/docker-proxy
Docker proxy based on nginx for zero downtime deployments
https://github.com/hacfi/docker-proxy
deployment deployment-automation docker docker-proxy expose nginx
Last synced: 12 days ago
JSON representation
Docker proxy based on nginx for zero downtime deployments
- Host: GitHub
- URL: https://github.com/hacfi/docker-proxy
- Owner: hacfi
- Created: 2017-12-01T14:28:51.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-12T00:38:30.000Z (about 7 years ago)
- Last Synced: 2024-10-30T01:40:07.349Z (about 2 months ago)
- Topics: deployment, deployment-automation, docker, docker-proxy, expose, nginx
- Language: Shell
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker proxy
Docker proxy based on nginx to have zero downtime deployments. It exposes two
ports so you can preview your next version before switching your live system.
Port 80 is meant for your live system and this is where your main load balancer
should point to. You can setup a secondary load balancer which points to port
8080 so you can preview your next version.## Build image
```
docker build -t docker-proxy .
```## Usage
Start the proxy with the following command:
```
docker run -d -v /var/run/docker.sock:/var/run/docker.sock -p 80:80 -p 8080:8080 --name docker-proxy docker-proxy
```Of course you can use different ports like `-p 5000:80 -p 5001:8080` or just
expose port 80 if you don’t need the second port to preview a release.Start your dockerized application and then run
```
docker exec -it docker-proxy proxy1
```to switch proxy 1 to that container. You can now access this application on port
80 (or whatever port you exposed port 80 on).When you release a new version start the new container and run
```
docker exec -it docker-proxy proxy2
```to be able to preview it on port 8080.
When everything looks good just run
```
docker exec -it docker-proxy proxy1
```to release the new version on the main port.