diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 934cd79..139c931 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,8 @@ { "build": { "context": "../", - "dockerfile": "../Dockerfile" + "dockerfile": "../Dockerfile", + "target": "dev", }, "forwardPorts": [8090] } diff --git a/Dockerfile b/Dockerfile index 17e457d..7e5e58d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-bullseye +FROM python:3.11-bullseye AS dev ADD pip-requirements.txt /tmp/pip-requirements.txt RUN pip install -r /tmp/pip-requirements.txt \ @@ -21,9 +21,11 @@ RUN apt update \ && rm -rf drawio-amd64-${DRAWIO_VERSION}.deb ENV XVFB_DISPLAY ":42" +FROM dev as prod + # Bundle app source -# COPY . . -# RUN ablog build +COPY . . +RUN ablog build EXPOSE 8090 CMD [ "ablog", "serve", "-p", "8090" ]