https://github.com/nwtgck/self-signed-https-docker
Docker image which enables your site with self-signed HTTPS easily
https://github.com/nwtgck/self-signed-https-docker
docker https nginx reverse-proxy
Last synced: 10 months ago
JSON representation
Docker image which enables your site with self-signed HTTPS easily
- Host: GitHub
- URL: https://github.com/nwtgck/self-signed-https-docker
- Owner: nwtgck
- License: mit
- Created: 2018-09-15T04:57:41.000Z (over 7 years ago)
- Default Branch: develop
- Last Pushed: 2021-07-11T20:16:25.000Z (over 4 years ago)
- Last Synced: 2025-02-06T13:29:23.762Z (11 months ago)
- Topics: docker, https, nginx, reverse-proxy
- Language: Shell
- Homepage:
- Size: 2.03 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# self-signed-https
[](https://hub.docker.com/r/nwtgck/self-signed-https/) [](https://microbadger.com/images/nwtgck/self-signed-https "Get your own image badge on microbadger.com")
Docker image which enables your site with self-signed HTTPS easily

## Quick Start
Suppose http://localhost:8181/ is running. The following command runs a HTTPS server on port 8080.
```bash
docker run -p 8080:80 -p 4443:443 -it -e TARGET_HOST=localhost -e TARGET_PORT=3000 nwtgck/self-signed-https
```
## Docker Compose
Here is an example `docker-compose.yml`.
In the example, self-signed HTTPS server is running on .
```yaml
version: '3.1'
services:
self-signed-https:
image: nwtgck/self-signed-https:v0.1.0
ports:
- '8080:80'
- '4443:443'
depends_on:
- ghost
restart: always
environment:
TARGET_HOST: ghost
TARGET_PORT: 2368
volumes:
- ./docker_volumes/ssl_certs:/ssl_certs
ghost:
image: ghost
restart: always
expose:
- "2368"
```
(from: [compose-examples/ghost/docker-compose.yml](compose-examples/ghost/docker-compose.yml))
### Data Persistence
The following files are located at `./docker_volumes/ssl_cert` in the above example.
* `server.key`
* `server.csr`
* `server.crt`
## Environment Variables
| name | description | required or default value |
|-------------------|----------------------------------------|---------------------------|
| TARGET_HOST | Host of destination | REQUIRED |
| TARGET_PORT | HTTP port of destination | `80` |
| SERVER_HTTP_PORT | HTTP port of Self-signed HTTPS server | `80` |
| SERVER_HTTPS_PORT | HTTPS port of Self-signed HTTPS server | `443` |