Skip to content

Commit

Permalink
Add dockerfile and uwsgi specs for siarnaq
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mao committed Nov 16, 2022
1 parent 0aa171f commit 4a0972e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
13 changes: 13 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM condaforge/mambaforge:22.9.0-1 AS conda

COPY environment.yml .
RUN mamba env create -p /env -f environment.yml && conda clean -afy

FROM ubuntu:22.10

COPY --from=conda /env /env

WORKDIR /app
COPY uwsgi.ini uwsgi.ini
COPY siarnaq siarnaq
CMD ["/env/bin/uwsgi", "--chdir=/app", "--uid=www-data", "--ini=uwsgi.ini"]
19 changes: 19 additions & 0 deletions backend/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: siarnaq
channels:
- conda-forge
dependencies:
- ca-certificates=2022.9.24
- django=4.1.2
- django-cors-headers=3.13.0
- djangorestframework=3.14.0
- drf-spectacular=0.24.2
- google-auth=2.13.0
- google-cloud-pubsub=2.13.10
- google-cloud-storage=2.5.0
- openssl=3.0.5
- pip=22.3
- python=3.10
- uwsgi=2.0.20
- pip:
- djangorestframework-simplejwt==5.2.2
- google-cloud-scheduler==2.7.3
9 changes: 9 additions & 0 deletions backend/uwsgi.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[uwsgi]
module=siarnaq.wsgi:application
master=true
pidfile=/tmp/project-master.pid
vacuum=true
max-requests=5000
http-socket=:80
processes=3
harakiri=20

0 comments on commit 4a0972e

Please sign in to comment.