Compare commits

..

1 commit

Author SHA1 Message Date
30171c3c4a Add UI and Dockerfile 2021-07-07 22:19:25 -04:00

View file

@ -1,4 +1,4 @@
FROM python:3.9.6-alpine3.13 as base
FROM python:3.9.6-alpine3.14 as base
WORKDIR /app
@ -21,9 +21,13 @@ RUN poetry build && /venv/bin/pip install dist/*.whl
FROM base as frontend
RUN apk add --no-cache make npm
RUN apk add --no-cache curl
COPY www /www
RUN make -C /www
RUN curl -sL --output elm.gz https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz \
&& gunzip elm.gz \
&& chmod +x elm \
&& cd /www \
&& /app/elm make /www/src/App.elm --output /www/public/elm.js
FROM base as final
@ -31,11 +35,11 @@ EXPOSE 8888
ENV TUTOR_PORT=8888 \
TUTOR_DATABASE=/tutor.db \
TUTOR_STATIC=/www/public
TUTOR_STATIC=/www
RUN apk add sqlite
COPY --from=builder /venv /venv
COPY --from=frontend /www /www
COPY --from=frontend /www/public /www
COPY docker-entrypoint.sh tables.sql ./
ENTRYPOINT ["./docker-entrypoint.sh"]
CMD ["server"]