www-data
1 year ago
12 changed files with 125 additions and 68 deletions
@ -0,0 +1,37 @@ |
|||||||
|
FROM ubuntu:latest |
||||||
|
|
||||||
|
# update to the latest packages |
||||||
|
ENV DEBIAN_FRONTEND="noninteractive" |
||||||
|
RUN apt-get update && apt-get upgrade -y |
||||||
|
|
||||||
|
# add user that will be used to install and run the application |
||||||
|
RUN groupadd -g 1000 deploy |
||||||
|
RUN useradd -m -u 1000 -g deploy deploy |
||||||
|
|
||||||
|
# install required packages for debugging |
||||||
|
# RUN apt-get install -y vim curl lsof |
||||||
|
|
||||||
|
|
||||||
|
# |
||||||
|
# CUSTOM PART IS BELOW HERE |
||||||
|
# |
||||||
|
|
||||||
|
|
||||||
|
# install required packages |
||||||
|
RUN apt-get install -y python3 python3-pip |
||||||
|
|
||||||
|
# switch to the created user and install the application |
||||||
|
USER deploy |
||||||
|
ENV PATH "$PATH:/home/deploy/.local/bin" |
||||||
|
|
||||||
|
COPY . /app |
||||||
|
WORKDIR /app |
||||||
|
|
||||||
|
RUN pip install --upgrade pip |
||||||
|
RUN pip install gunicorn |
||||||
|
RUN pip install wheel |
||||||
|
RUN pip install flit |
||||||
|
|
||||||
|
RUN flit install --pth-file |
||||||
|
|
||||||
|
CMD ["gunicorn", "--paster", "/app/production.ini", "-b", "0.0.0.0:8000"] |
Loading…
Reference in new issue