Agregado docker!!!
Siempre e querido usarlo y esta parece ser una buena oportunidad para comenzar :3
This commit is contained in:
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM python:alpine
|
||||
|
||||
RUN mkdir /app
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
ENV GUNICORN_WORKERS 2
|
||||
ENV GUNICORN_BIND 0.0.0.0:8080
|
||||
CMD ["gunicorn", "--config", "gunicorn.conf", "run:app"]
|
||||
7
gunicorn.conf
Normal file
7
gunicorn.conf
Normal file
@@ -0,0 +1,7 @@
|
||||
import os
|
||||
|
||||
for k,v in os.environ.items():
|
||||
if k.startswith("GUNICORN_"):
|
||||
key = k.split('_', 1)[1].lower()
|
||||
locals()[key] = v
|
||||
|
||||
3
requirements.txt
Normal file
3
requirements.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
Flask==1.0.2
|
||||
Flask-SQLAlchemy==2.3.2
|
||||
gunicorn==19.9.0
|
||||
Reference in New Issue
Block a user