Coder Social home page Coder Social logo

nginx-container's Introduction

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-container 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!

nginx-container's People

Contributors

expire0 avatar

Stargazers

 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.