-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to gunicorn for serving applications
- Loading branch information
Showing
10 changed files
with
31 additions
and
88 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
FROM grahamdumpleton/mod-wsgi-docker:python-3.5 | ||
FROM python:3.5 | ||
MAINTAINER Camptocamp "[email protected]" | ||
|
||
# Doing things in two steps to avoid needing to re-install everything when we do a rebuild | ||
# after changing code | ||
|
||
# Step #1 copy only the stuff needed to install the dependencies and run the script | ||
WORKDIR /app | ||
COPY requirements.txt setup.py c2cwsgiutils-0.0.0-py3-none-any.whl /app/ | ||
COPY .whiskey /app/.whiskey | ||
RUN mod_wsgi-docker-build | ||
RUN pip install -r requirements.txt | ||
|
||
EXPOSE 80 | ||
|
||
|
@@ -22,4 +22,4 @@ ENV DEVELOPMENT 0 | |
COPY . /app | ||
RUN python /app/setup.py install | ||
|
||
CMD ["mod_wsgi-docker-start", "application.wsgi"] | ||
CMD ["c2cwsgiutils_run"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
""" | ||
Module used by c2cwsgiutils_run.sh to provide a WSGI application when starting gunicorn | ||
""" | ||
from c2cwsgiutils import wsgi | ||
|
||
|
||
application = wsgi.create_application() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
if [ -z "$GUNICORN_PARAMS" ] | ||
then | ||
GUNICORN_PARAMS="-b :80 --threads 10 --workers 5" | ||
fi | ||
gunicorn $GUNICORN_PARAMS c2cwsgiutils.wsgi_app:application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters