Giter Site home page Giter Site logo

tin-nguyen / docker-nginx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from disqus/docker-nginx

0.0 2.0 0.0 148 KB

some dockerfiles for some nginx

Home Page: https://registry.hub.docker.com/u/disqus/nginx/

Dockerfile 93.63% Makefile 0.70% Shell 5.67%

docker-nginx's Introduction

Supported tags and respective Dockerfile links

Why not link containers?

In larger deployments, it's harder to tightly couple an application container with it's nginx configs and make sure that they are always 100% paired together. This does not replace a normal upstream proxy, but this is intended to run in front of say, uwsgi or gunicorn.

How to use this image

Create a Dockerfile in your Python app project

FROM disqus/nginx:python2-onbuild

If you need to override your own nginx config files, you can COPY them in

FROM disqus/nginx:python2-onbuild
COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY nginx/conf.d/ /etc/nginx/conf.d/
COPY nginx/sites-enabled/ /etc/nginx/sites-enabled/

These images include multiple ONBUILD triggers, which should be all you need to bootstrap most applications. The build will COPY a requirements.txt file, RUN pip install on said file, copy the current directory into /usr/src/app, then run wsgi.py with uwsgi.

You can then build and run the Docker image:

docker build -t my-python-app .
docker run -it --rm --name my-running-app my-python-app

Image Variants

The disqus/nginx images come in many flavors, each designed for a specific use case.

`disqus/nginx:python

This image is a mashup of nginx + python:<version>, meant for running python based applications behind a tightly coupled nginx.

`disqus/nginx:python-onbuild

This image makes deploying a python application behind nginx much easier. It works identically to the python:onbuild images, but also hooks up uwsgi/nginx for you. If your project includes a wsgi.py file in the root, this image will run that with uwsgi and drops an nginx config that will uwsgi_pass to it.

docker-nginx's People

Contributors

mattrobenolt 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.