Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vanyauhalin/docker-nginx
A simple Docker image for Nginx that eliminates the need to configure it over and over again
https://github.com/vanyauhalin/docker-nginx
acme container docker image letsencrypt nginx
Last synced: 22 days ago
JSON representation
A simple Docker image for Nginx that eliminates the need to configure it over and over again
- Host: GitHub
- URL: https://github.com/vanyauhalin/docker-nginx
- Owner: vanyauhalin
- License: mit
- Created: 2024-05-18T18:01:03.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-10-29T05:21:57.000Z (3 months ago)
- Last Synced: 2025-01-04T10:56:06.205Z (29 days ago)
- Topics: acme, container, docker, image, letsencrypt, nginx
- Language: Shell
- Homepage: https://hub.docker.com/r/vanyauhalin/nginx/
- Size: 85 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Nginx Docker Image
This is a simple Docker image for Nginx, created by someone not specialized in configuring Nginx or writing shell scripts, to eliminate the need to configure it over and over again.
This image contains:
- A static Brotli module.
- Support for obtaining SSL certificates with their auto-renewal.
- The ability to substitute environment variables in the Nginx configuration.
- A few basic snippets to configure Nginx.Important criteria for creating this image were:
- Do not attempt to automate the formation of the configuration file.
- Do not enforce any configuration options.
- Write scripts as simply and clearly as possible.
- Avoid performing complex operations in scripts.> [!TIP]
>
> **If you have found this image helpful, show your support!** \
> Give the project a star on GitHub. I appreciate it.## Contents
- [Installation](#installation)
- [Description](#description)
- [Acknowledgements](#acknowledgements)
- [License](#license)## Installation
Pull image from Docker Hub:
```sh
docker pull vanyauhalin/nginx
```... or from GitHub Container registry:
```sh
docker pull ghcr.io/vanyauhalin/nginx
```## Description
_Description in progress, sorry..._
Show
ae
help message```text
Usage: ae [options]
ae obtain [options]
ae renew [options]
ae logs [options]
ae acmeOptions:
-p Pipes the output to the log file
(available for 'install', 'obtain', 'schedule', 'trigger' and 'renew' subcommands)Subcommands:
help Shows this help message
install Installs the client
obtain Obtains certificates
schedule Schedules certificate renewal
trigger Triggers scheduled operations
renew Renews certificates
logs Shows the log file
env Shows the environment variables
acme Runs the acme clientObtain options:
-g Obtains certificates only for non-existing domains
-s Skips Nginx reloadObtain types:
self Obtains self-signed certificates
test Obtains test certificates
prod Obtains production certificatesRenew options:
-f Forces renewal of certificatesLogs options:
-f Follows the log file
-n Shows the last lines of the log fileEnvironment variables:
AE_ENABLED Whether ae is enabled
AE_CRON Cron schedule for certificate renewal
AE_DAYS Validity period for certificates when obtaining new ones
AE_DOMAINS Comma-separated list of domains to obtain certificates for
AE_EMAIL Email address to use when obtaining certificates
AE_KEY_SIZE Size of the RSA key to be generated
AE_HEALTHCHECKS_URL URL to Healthchecks check
```Show
ng
help message```txt
Usage: ngSubcommands:
help Shows this help message
render Renders the Nginx config from the templateEnvironment variables:
NG_ENABLED Whether ng is enabled
```Show mentioned files and directories in the tree format
```txt
├─ etc
│ └─ nginx
│ ├─ snippets
│ │ ├─ example.com
│ │ │ ├─ proxy-ssl-certificate.conf
│ │ │ └─ ssl-certificate.conf
│ │ ├─ acme-challenge.conf
│ │ ├─ base-headers.conf
│ │ ├─ base-options.conf
│ │ ├─ brotli-options.conf
│ │ ├─ force-https.conf
│ │ ├─ force-non-www.conf
│ │ ├─ gzip-options.conf
│ │ ├─ map-non-www.conf
│ │ ├─ proxy-options.conf
│ │ ├─ proxy-ssl-options.conf
│ │ ├─ ssl-dhparam.conf
│ │ ├─ ssl-headers.conf
│ │ └─ ssl-options.conf
│ ├─ ssl
│ │ ├─ example.com
│ │ │ ├─ chain.pem
│ │ │ ├─ fullchain.pem
│ │ │ └─ privkey.pem
│ │ └─ dhparam.pem
│ ├─ nginx.conf
│ └─ nginx.conf.template
├─ usr
│ ├─ bin
│ │ └─ envsubst
│ ├─ local
│ │ └─ bin
│ │ ├─ acme
│ │ ├─ ae
│ │ ├─ entrypoint
│ │ └─ ng
│ └─ sbin
│ └─ nginx
├─ log
│ ├─ ae
│ │ └─ output.log
│ └─ nginx
│ ├─ access.log
│ └─ error.log
└─ var
└─ www
└─ example.com
```## Acknowledgements
This image would not have happened without studying other people's project.
[wokalek/nginx-brotli] \
The creation of this image began with studying Alexander Wokalek's work. His image formed the basis of this image with almost no changes. In a sense, this project is a fork of that one. If you are looking for Nginx without additional overhead, but with only the brotli module compiled, consider using wokalek's image.[nginx-le/nginx-le] \
The image created by [Umputun] demonstrated how to work with scripts that process SSL certificates within the same image with Nginx.[h5bp/server-configs-nginx], [lebinh/nginx-conf] \
I would like to mention several resources in one line from which snippets were collected.[Mozilla SSL Configuration Generator], [Report URI Content Security Policy Generator] \
Let us not forget about useful generators, which also helped to form a few snippets.## License
[MIT] (c) [Ivan Uhalin]
[acmesh-official/acme.sh]: https://github.com/acmesh-official/acme.sh/
[google/ngx_brotli]: https://github.com/google/ngx_brotli/
[h5bp/server-configs-nginx]: https://github.com/h5bp/server-configs-nginx/
[lebinh/nginx-conf]: https://github.com/lebinh/nginx-conf/
[nginx-le/nginx-le]: https://github.com/nginx-le/nginx-le
[wokalek/nginx-brotli]: https://github.com/wokalek/nginx-brotli/[GNU envsubst]: https://www.gnu.org/software/gettext/manual/html_node/envsubst-Invocation.html
[Mozilla SSL Configuration Generator]: https://ssl-config.mozilla.org/
[Report URI Content Security Policy Generator]: https://report-uri.com/home/generate/[Ivan Uhalin]: https://github.com/vanyauhalin/
[Umputun]: https://github.com/umputun/[MIT]: https://github.com/vanyauhalin/docker-nginx/blob/main/LICENSE/