Skip to content

Set up a container running nginx and incron. Incron handles filesystem events in nginx configuration and reload it when change are done.

License

Notifications You must be signed in to change notification settings

saidbouras/nginx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nginx

A simple container running nginx and incron with s6-overlay supervisor. Incron handles filesystem events to reload nginx service automatically when changes are occured in nginx configuration files.

See s6-overlay wiki and inotify for more explanations.

Usage

To put out the configuration of nginx, map the directory /etc/nginx or /etc/nginx/sites-enabled like that :

docker run --net host --name nginx -dt \
    -v /etc/nginx/sites-enabled:/etc/nginx/sites-enabled \
    -v /var/log/nginx:/var/log/nginx \
    -v /var/www/:/var/www \
    -p 80:80 \
    -p 443:443 \
    rinscy/nginx:1.1.2

You can choose the alpine version rinscy/nginx:alpine-1.1.2 if you want a much lighter docker image.

If you set up a website inside a docker container which mount the /var/www directory as a shared volume, this nginx container will work in condition that your container holding your website was started with --volumes-from nginx.

About

Set up a container running nginx and incron. Incron handles filesystem events in nginx configuration and reload it when change are done.

Resources

License

Stars

Watchers

Forks

Packages

No packages published