Compare commits
1 commit
a38465fc77
...
30171c3c4a
Author | SHA1 | Date | |
---|---|---|---|
30171c3c4a |
1 changed files with 9 additions and 5 deletions
14
Dockerfile
14
Dockerfile
|
@ -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"]
|
||||
|
|
Loading…
Reference in a new issue