surprise-countdown/Dockerfile

20 lines
502 B
Docker

FROM python:3-alpine
ENV SURPRISE_ASSET_DIR=/assets
ENV ELM_VERSION=0.19.1
ENV PYTHONUNBUFFERED=1
COPY backend backend
COPY frontend frontend
ADD https://github.com/elm/compiler/releases/download/$ELM_VERSION/binary-for-linux-64-bit.gz elm.gz
RUN gunzip elm.gz && \
chmod +x elm && \
mv elm /bin/elm
RUN cd frontend && \
elm make src/Main.elm --optimize --output=../backend/static/main.js
WORKDIR backend
RUN pip install -r requirements.pip
ENTRYPOINT ["flask", "run", "-h", "0.0.0.0"]