No description
  • Jinja 49.3%
  • Python 38.4%
  • Shell 12.3%
Find a file
Chris Houseknecht b3900ec12c
Show service log
2018-01-23 01:47:28 -05:00
defaults Provide empty defaults 2016-12-04 01:23:34 -05:00
files Remove /static location 2016-12-08 03:16:05 -05:00
handlers first commit 2016-09-19 16:03:50 -04:00
meta Fixing tests 2017-05-15 18:58:32 -04:00
tasks Use the command module 2016-12-22 23:05:09 -05:00
templates Fix error page location 2016-12-23 00:23:49 -05:00
tests Test Travis Ubuntu image update 2017-06-20 11:34:28 -04:00
vars first commit 2016-09-19 16:03:50 -04:00
.gitignore Fixing tests 2017-05-15 18:58:32 -04:00
.mailmap Add mailmap 2016-12-12 15:24:48 -05:00
.travis.yml Show service log 2018-01-23 01:47:28 -05:00
AUTHORS Add mailmap 2016-12-12 15:24:48 -05:00
pre-commit Initial 2016-12-12 15:23:59 -05:00
README.md Adds comments .travis.yml and cleans-up README 2017-07-22 11:20:21 -04:00
update-authors.py Initial 2016-12-12 15:23:59 -05:00

Build Status

nginx-container

Adds an nginx service to your Ansible Container project. Run the following commands to install the service:

# Set the working directory to your Ansible Container project root
$ cd myproject

# Install the service
$ ansible-container install ansible.nginx-container

Requirements

  • Ansible Container
  • An existing Ansible Container project. To create a project, simply run the following:
    # Create an empty project directory
    $ mkdir myproject
    
    # Set the working directory to the new directory
    $ cd myproject
    
    # Initialize the project
    $ ansible-contiainer init
    

Role Variables

STATIC_ROOT: /static

Path to static content to be served by nginx.

PIDFILE_DIR: /run/nginx

Path where nginx will store the current PID value.

ASSET_PATHS: []

List of paths from which static content will be copied. Content will be copied to {{ STATIC_ROOT }}.

NOTE paths must be valid within the Ansible build container. If you're copying source files, mount the source directory to the build container using --with-volumes.

PROXY: no

When using this role as part of the demo app, nginx needs to proxy the django service, in which case set this to 'yes'.

PROXY_PASS: ""

The address of the backend server accepting the proxied requests. For example: http://django:8080

PROXY_LOCATION: ""

A string containing an optional modifier and a matching pattern. Requests that contain the matching pattern are forwarded to the PROXY_PASS address. For example,~* /(api|static) will forward requests that start with /api ro /static.

Dependencies

None.

Contributing

For convenience, as you're working on changes to this role, you can test by using the following workflow:

# Commit your changes
$ git commit -m

# Push your changes 
$ git push 

# Set the working directory to tests
$ cd tests 

# Run a build that installs the role at the most recent commit 
$ ./build.sh

A couple of notes:

  • You must git push your changes in order for the build to pick them up.
  • Modify build.sh to point to your fork of this role.
  • If all goes well, and the build succeeds, the container built from your latest commit will be running in the background.
  • The running container will publish port 8000:8000, so if you point a browser to http://localhost:8000, you should see the dfault nginx page .

License

Apache v2

Author Information

See AUTHORS for a list of contributors. Thanks everyone!