Merge branch 'main' of ssh://git.lajuntament.space:2222/lajuntament/absencia-de-presencia
This commit is contained in:
14
deploy/Dockerfile
Normal file
14
deploy/Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
FROM python:3.8
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY requirements.txt .
|
||||||
|
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
COPY main.py .
|
||||||
|
COPY static .
|
||||||
|
COPY templates .
|
||||||
|
COPY deploy/presencia.ini .
|
||||||
|
|
||||||
|
CMD ["uwsgi", "--ini", "presencia.ini"]
|
||||||
10
deploy/presencia.ini
Normal file
10
deploy/presencia.ini
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
[uwsgi]
|
||||||
|
module = main:app
|
||||||
|
chown = www-data:www-data
|
||||||
|
uid = www-data
|
||||||
|
gid = www-data
|
||||||
|
chdir = /app/
|
||||||
|
processes = 4
|
||||||
|
threads = 2
|
||||||
|
socket = 0.0.0.0:5000
|
||||||
|
wsgi-disable-file-wrapper = false
|
||||||
9
deploy/publish.sh
Executable file
9
deploy/publish.sh
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# BUILD
|
||||||
|
docker build . -f deploy/Dockerfile -t presencia
|
||||||
|
|
||||||
|
# PUBLISH
|
||||||
|
docker tag presencia marc.sastre.cat/presencia
|
||||||
|
docker push marc.sastre.cat/presencia
|
||||||
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Flask==2.0.2
|
||||||
|
uwsgi==2.0.19.1
|
||||||
Reference in New Issue
Block a user