Sign inSign up

icj217/hv-sysops-nginx

By icj217

•Updated over 6 years ago

Nginx docker image that dynamically loads config based on environment variables

Image
0

1.2K

icj217/hv-sysops-nginx repository overview

⁠Introduction

This docker container starts an nginx server that serves up the content of the /var/www directory.

The server configuration changes dynamically based on the value of the ENVIRON environment variable.

See below for details.

Published to Docker Hub under icj217/hv-sysops-nginx:latest repository⁠

Source code available here⁠

⁠Running

The docker image can be run using docker run or Docker Compose.

Using Docker Compose can be helpful if you need to specify numerous environment variables/volume mounts and/or if you are using this container within a multi-service project.

⁠Environment

To run the image, pass an ENVIRON environment variable into the container, e.g. docker run -p 8080:80 -e "ENVIRON=dev" icj217/hv-sysops-nginx:latest

The following are valid ENVIRON values: dev, prod

There is no default value for this environment variable to limit the chance of accidental misconfiguration.

⁠Content

To override the default content served by nginx, simply mount a volume over the /var/www/ directory, e.g. docker run -p 8080:80 --volume=/my/local/content:/var/www -e "ENVIRON=dev" icj217/hv-sysops-nginx:latest

Tag summary

Content type

Image

Digest

Size

48.5 MB

Last updated

over 6 years ago

docker pull icj217/hv-sysops-nginx