Docker image for Nginx reverse proxy with automatical Https setup and renew
1.4K
This Docker image is to automatically build NGinx reverse proxy with Https certificate. Also, it may renew Https certificates every month.
It is based on nginx:alpine Docker image (link) and Certbot NGinx plugin (link)
docker run -d -p 80:80 -p 443:443 -p 50051:50051 \
-e IS_DEBUG=true \
-e SERVER_DOMAIN=your-server-domain.com \
-e SERVER_EMAIL=your-email@com \
woohyeokchoi/nginx-https
You should open two ports, 80 (Http) and 443 (Https) for certification. If you use gRPC, you should also open 50051.
If you want to use the Docker secret instead of setting environment variables, your secret file should be a format of INI, as below:
[${INI_SECTION}]
debug = true
server_domain = your-domain
server_email = your-email
For the Docker secret, you should set following variables:
If you want to use your own NGinx configuration, try to do followings:
docker run -d -p 80:80 -p 443:443 \
-e IS_DEBUG=true \
-e SERVER_DOMAIN=your-server-domain.com \
-e SERVER_EMAIL=your-email@com \
-v *YOUR_OWN_CONFIGURATION_FOLDER*:/home/conf/nginx
woohyeokchoi/nginx-https
Currently, this image supports three types of additional NGinx configuration:
To use it, your configuration file should be named http.loc*.conf (e.g., http.loc.my-conf.conf). In this configuration file, you should set location block in NGinx:
location / {
proxy_pass http://my.proxy.pass
}
To use it, your configuration file should be named grpc.loc*.conf (e.g., grpc.loc.my-conf.conf). In this configuration file, you should set location block in NGinx:
location / {
grpc_pass grpc://my.proxy.pass
}
To use it, your configuration file should be named ups*.conf (e.g., upstream-my.conf). In this configuration file, you should set upstream block in NGinx:
upstream my-server-name { server my-server-address }
Content type
Image
Digest
Size
32.5 MB
Last updated
almost 8 years ago
docker pull woohyeokchoi/nginx-https