Git Product home page Git Product logo

s2i-nginx's Introduction

Source-to-image builder for static nginx containers

Basic use case

Have a git repo with a directory html (or NGINX_STATIC_DIR), in which all static files to serve are.

s2i-nginx will take all files within, copy them into the docker image and take a basic nginx config that will simply serve these files.

If there is no html directory, it will just copy all files in the repo. In that case you will not be able to customize the nginx config.

Configuring nginx

You can supply a nginx.conf-snippet that will be used by the built container.

If there is a directory conf.d containing (possibly multiple) nginx server snippets these will be used. It will not copy the default config, so be sure to include the right files. See etc/nginx.server.sample.conf for the default config.

Auxiliary files

You can put auxiliary files in a directory aux (or NGINX_AUX_DIR) to copy them to the resulting image, e.g. htpasswd files.

These will be copied to /opt/app-root/etc/aux.

Environment variables

There are some environment variables you can set to influence build behavior.

NGINX_STATIC_DIR sets the repo subdir to use for static files, default html.

Either NGINX_CONF_FILE sets a config snippet to use or NGINX_CONF_DIR will copy config from this dir (defaults to conf.d).

NGINX_AUX_DIR sets the aux directory for auxiliary files.

s2i-nginx's People

Contributors

ibotty avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.