-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #494 from OpenUpSA/sys/dockerise
Sys/dockerise
- Loading branch information
Showing
5 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -4,6 +4,8 @@ | |
# C extensions | ||
*.so | ||
|
||
*.env | ||
|
||
# Packages | ||
*.egg | ||
*.egg-info | ||
|
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,30 @@ | ||
FROM python:3.7.17-slim-bullseye | ||
|
||
ENV PYTHONUNBUFFERED=1 \ | ||
PIP_NO_CACHE_DIR=1 \ | ||
PIP_DISABLE_PIP_VERSION_CHECK=1 | ||
|
||
RUN set -ex \ | ||
&& addgroup --system --gid 1001 appuser \ | ||
&& adduser --system --uid 1001 --gid 1001 --no-create-home appuser \ | ||
&& apt-get update \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get install -y build-essential \ | ||
&& apt-get install -y libpq-dev \ | ||
&& apt-get install -y git \ | ||
&& apt-get install -y libmagic1 \ | ||
&& apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /app | ||
|
||
COPY requirements.txt . | ||
RUN pip install -r requirements.txt | ||
|
||
COPY . . | ||
RUN chown -R appuser:appuser /app | ||
|
||
USER appuser | ||
|
||
EXPOSE 5000 |
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,2 +1,3 @@ | ||
web: gunicorn --workers $GUNICORN_WORKERS --worker-class gevent --timeout $GUNICORN_TIMEOUT --max-requests $GUNICORN_MAX_REQUESTS --max-requests-jitter 100 --log-file - --access-logfile - pmg:app | ||
#web: gunicorn --workers $GUNICORN_WORKERS --worker-class gevent --timeout $GUNICORN_TIMEOUT --max-requests $GUNICORN_MAX_REQUESTS --max-requests-jitter 100 --log-file - --access-logfile - pmg:app | ||
web: gunicorn --workers 5 --worker-class gevent --timeout 30 --max-requests 10000 --max-requests-jitter 100 --log-file - --access-logfile - pmg:app | ||
worker: python app.py start_scheduler |
This file was deleted.
Oops, something went wrong.