https://github.com/blackbass64/docker-https
🐳 5 steps to set up reverse proxy and HTTPS (SSL certificate) for Docker container
https://github.com/blackbass64/docker-https
docker https ssl
Last synced: 9 months ago
JSON representation
🐳 5 steps to set up reverse proxy and HTTPS (SSL certificate) for Docker container
- Host: GitHub
- URL: https://github.com/blackbass64/docker-https
- Owner: blackbass64
- Created: 2022-04-23T15:19:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-23T17:20:38.000Z (over 3 years ago)
- Last Synced: 2025-04-23T19:16:29.857Z (9 months ago)
- Topics: docker, https, ssl
- Homepage:
- Size: 2.93 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🐳 5 steps to set up reverse proxy and HTTPS (SSL certificate) for Docker container
1. Create Docker compose file for nginx-proxy stacks same as [nginx-proxy.yaml](https://github.com/atbee/docker-https/blob/main/nginx-proxy.yaml)
2. Run nginx-proxy stacks
```bash
$ docker-compose -f nginx-proxy.yaml up -d
```
3. Add these environment variables to your container, for example [whoami.yaml](https://github.com/atbee/docker-https/blob/main/whoami.yaml)
- VIRTUAL_HOST - *Domain to access the container*
- VIRTUAL_PORT - *Container port*
- LETSENCRYPT_HOST - *Domain for issuing SSL certificate by Let's Encrypt*
- LETSENCRYPT_EMAIL - *Your email for Let's Encrypt notifications*
4. Start/Restart the container
```bash
# example
$ docker-compose -f whoami.yaml up -d
```
5. Test
Run the following command to test the reverse proxy locally
```bash
$ curl -L -H "Host: " localhost
```
Then go to your domain on browser for HTTPS and SSL certificate verification
---
Thanks [nginx-proxy](https://github.com/nginx-proxy/nginx-proxy) for the awesome tool