https://github.com/atomgraph/letsencrypt-nginx-unprivileged
Unprivileged (non-root) nginx Docker image which waits for the upstream server with LetsEncrypt certificate support
https://github.com/atomgraph/letsencrypt-nginx-unprivileged
http-server letsencrypt nginx nginx-unprivileged
Last synced: 9 months ago
JSON representation
Unprivileged (non-root) nginx Docker image which waits for the upstream server with LetsEncrypt certificate support
- Host: GitHub
- URL: https://github.com/atomgraph/letsencrypt-nginx-unprivileged
- Owner: AtomGraph
- Created: 2021-12-01T15:20:45.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-08T13:25:04.000Z (about 4 years ago)
- Last Synced: 2025-01-19T22:40:52.961Z (11 months ago)
- Topics: http-server, letsencrypt, nginx, nginx-unprivileged
- Language: Dockerfile
- Homepage: https://hub.docker.com/r/atomgraph/letsencrypt-nginx-unprivileged
- Size: 13.7 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nginx
Unprivileged nginx Docker image with [awscliv2](https://pypi.org/project/awscliv2/) and [python3-certbot-dns-route53](https://certbot-dns-route53.readthedocs.io/) installed.
# Usage
## Server certificate
If `$GENERATE_SERVER_CERT=true` and `$SERVER_NAME` is set (to the hostname of the server, e.g. `localhost`), a self-signed server certificate and private key will be generated under `$SERVER_CERT_FILE` (by default `/etc/nginx/ssl/server.crt`) and `$SERVER_KEY_FILE` (by default `/etc/nginx/ssl/server.key`), respectively.
## Upstream sever
If `$UPSTREAM_SERVER` is supplied, then the entrypoint script will ping that host for a `$TIMEOUT` number of seconds (the default is 10).
If the host responds during that period, the entrypoint command is executed. Otherwise the script exits.
# Example
Using `docker-compose.yml`:
version: "2.3"
services:
nginx:
image: atomgraph/nginx
environment:
- GENERATE_SERVER_CERT=true
- SERVER_NAME=localhost
- UPSTREAM_SERVER=tomcat
command: nginx -g 'daemon off;'
volumes:
- ./certs:/etc/nginx/ssl