Merge remote-tracking branch 'origin/master'

This commit is contained in:
Ross Mountjoy 2020-02-09 00:08:36 -05:00
commit 2bc5f6c28a
3 changed files with 32 additions and 9 deletions

6
.dockerignore Normal file
View File

@ -0,0 +1,6 @@
.git
.idea/
dashmachine/user_data/
dashmachine/static/images/icons
dashmachine/static/images/backgrounds

View File

@ -1,11 +1,19 @@
FROM python:3.8.0-slim
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN apt-get update \
&& apt-get install gcc git iputils-ping -y \
&& apt-get clean
FROM python:3.8-slim
COPY ./ DashMachine
WORKDIR DashMachine
RUN pip install -r requirements.txt
RUN apt-get update -q \
&& apt-get install --no-install-recommends -qy \
inetutils-ping \
&& rm -rf /var/lib/apt/lists/*
COPY [ "requirements.txt", "/dashmachine/" ]
WORKDIR /dashmachine
RUN pip install --no-cache-dir --progress-bar off -r requirements.txt
COPY [ ".", "/dashmachine/" ]
ENV PRODUCTION=true
EXPOSE 5000
CMD ["python", "run.py"]
VOLUME /dashmachine/dashmachine/user_data
CMD [ "gunicorn", "--bind", "0.0.0.0:5000", "wsgi:app" ]

9
wsgi.py Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env python3
from dashmachine import app
from dashmachine.main.utils import dashmachine_init
dashmachine_init()
if __name__ == "__main__":
app.run()