Add docker support
This commit is contained in:
19
deploy/Dockerfile
Normal file
19
deploy/Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM python:3.8
|
||||
|
||||
RUN groupadd user
|
||||
RUN useradd -m -d /home/user -s /bin/bash -g user -m user
|
||||
|
||||
WORKDIR /home/user
|
||||
COPY deploy/requirements.txt /tmp/
|
||||
RUN pip install -r /tmp/requirements.txt
|
||||
|
||||
USER user:user
|
||||
|
||||
RUN mkdir -p ~/data/files
|
||||
RUN touch ~/data/myapp.log
|
||||
|
||||
COPY --chown=user:user . ./
|
||||
|
||||
# EXPOSE 8000
|
||||
|
||||
CMD ["gunicorn", "-w", "4", "--bind=0.0.0.0", "myapp:app"]
|
||||
Reference in New Issue
Block a user