You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Vladimir Zorin b9827624bf
Remove hardcoded names from drone pipeline
2 months ago
apk Use specific versions of luarocks modules to enhance reproducibility; Bump up components versions 2 months ago
scripts Bump up deviant version 2 months ago
src Use specific versions of luarocks modules to enhance reproducibility; Bump up components versions 2 months ago
.drone.yml Remove hardcoded names from drone pipeline 2 months ago
Dockerfile Use specific versions of luarocks modules to enhance reproducibility; Bump up components versions 2 months ago
LICENSE.txt Add CC0 license 2 months ago
README.md Add readme section on the origin 2 months ago
supervisor.lua Use specific versions of luarocks modules to enhance reproducibility; Bump up components versions 2 months ago

README.md

Openresty alpine-based docker image with bells & whistles

Build Status

Description

Dockerfile + APKBUILD files to build an opinionated openresty docker image. Openresty is built from sources (see apk directory). For the list of included/excluded nginx modules, see openresty APKBUILD file. The resulting image will also include the following luarocks modules:

  • inspect
  • pgmoon
  • libcidr-ffi
  • nginx-lua-prometheus
  • redstats
  • luasocket
  • luasodium
  • lunamark
  • lua-resty-http
  • lua-resty-session
  • lua-resty-jwt
  • lua-resty-jit-uuid

Usage

There is a builtin nginx config. Nginx is configured to include every *.conf file from /etc/nginx/conf.d/ (files from this dir included above nginx http config block) and /etc/nginx/vhosts/ directories, so you can just mount a host directory with your virtual host configs to containerr’s /etc/nginx/vhosts directory.

If NGINX_VHOST_TEMPLATES environment variable is defined, before actually starting nginx, the entrypoint script looks for files with .tmpl extension in the NGINX_VHOST_TEMPLATES directory.

Each .tmpl file gets rendered by the entrypoint script, and the output goes to the file with the same name, but .conf extension under /etc/nginx/vhosts/ dir. For example, if NGINX_VHOST_TEMPLATES is set to /templates and you have /templates/first.tmpl template file, the rendered content will be in the /etc/nginx/vhosts/first.conf file.

Every occurrence of {{ENV_VAR_NAME}} in a template is replaced with the value of the corresponding environment variable. It’s pretty much the same what envsubst does, but gettext alpine package adds 7Mb to the image. Besides, you can’t change the capture pattern in envsubst.

Origin

The origin repository is located at git.deviant.guru. Github copy is a mirror, and in troubled times may lag behind. On the other hand, the origin also might happen to be offline during those times. After all, it’s just a small server box which travels with me.