This repository has been archived by the owner on Sep 25, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Run with uWSGI usage #13
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
5ea9034
Document process for Python package installation
giorgiosironi 12a754c
Install uwsgi
giorgiosironi 4d97f9e
Rename main container to app
giorgiosironi 6b27ab8
Exposing a callable to uWSGI
giorgiosironi c2ad6a7
Run uwsgi in place of flask
giorgiosironi 68e363d
Pin packages minor versions
giorgiosironi 53ef3f2
Move Pipfile* into /pipfiles and install in a pre-created venv
giorgiosironi 439b7d2
Simplify installation of new Python package
giorgiosironi b8cd2a5
Remove nobody user suggestion as it prevents port 80 use
giorgiosironi 926276b
Merge remote-tracking branch 'origin/master' into wsgi
giorgiosironi e62e5a8
Move down detail about DevelopmentConfig
giorgiosironi 51bb963
Use --no-cache for apk
giorgiosironi ca2738e
Join RUN statements
giorgiosironi 6c56a2f
Adopt SIGINT as the development stopping mechanism for uwsgi
giorgiosironi a53a011
Merge remote-tracking branch 'origin/master' into wsgi
giorgiosironi e7ec57b
Merge remote-tracking branch 'origin/master' into wsgi
giorgiosironi 9403338
Merge branch 'master' into wsgi
giorgiosironi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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,12 @@ | ||
[uwsgi] | ||
chdir=/app | ||
pythonpath=/app | ||
virtualenv=/.venv | ||
wsgi-file=content_store/api/wsgi.py | ||
callable = APP | ||
|
||
http=0.0.0.0:80 | ||
master=True | ||
processes=4 | ||
max-requests=5000 | ||
#logto = uwsgi.log |
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
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,11 +1,14 @@ | ||
ARG python_base_image_tag | ||
FROM python:${python_base_image_tag} | ||
RUN pip install --no-cache-dir --only-binary --upgrade pipenv | ||
|
||
RUN apk --no-cache add linux-headers g++ | ||
# uwsgi and pylint build dependencies | ||
RUN apk add --no-cache gcc g++ libc-dev linux-headers \ | ||
&& pip install --no-cache-dir --only-binary --upgrade pipenv \ | ||
&& python -m venv /.venv | ||
|
||
COPY Pipfile Pipfile.lock ./ | ||
ENV VIRTUAL_ENV=/.venv PYTHONUSERBASE=/.venv PATH=/.venv/bin:$PATH | ||
COPY Pipfile Pipfile.lock /pipfiles/ | ||
|
||
ARG pipenv_dev_arg | ||
ENV PIPENV_VENV_IN_PROJECT=1 | ||
WORKDIR /pipfiles | ||
RUN pipenv install ${pipenv_dev_arg} --deploy --ignore-pipfile |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,3 @@ | ||
from content_store.api.api import create_app | ||
|
||
APP = create_app() |
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,6 @@ | ||
version: '3' | ||
|
||
services: | ||
venv: | ||
volumes: | ||
- ./:/pipfiles/ |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The app shouldn't be in the
api
namespace, let alone twice!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General structure (until there is logic to organize) still unclear, but a few (hopefully one) stable top-level package(s) is needed, the rest can be moved around