mirror of
https://github.com/len0rd/personal-website.git
synced 2025-03-01 03:51:57 -05:00
split dev and prod docker stages
This commit is contained in:
parent
4285425051
commit
b52ddcb0d8
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
"build": {
|
"build": {
|
||||||
"context": "../",
|
"context": "../",
|
||||||
"dockerfile": "../Dockerfile"
|
"dockerfile": "../Dockerfile",
|
||||||
|
"target": "dev",
|
||||||
},
|
},
|
||||||
"forwardPorts": [8090]
|
"forwardPorts": [8090]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM python:3.11-bullseye
|
FROM python:3.11-bullseye AS dev
|
||||||
|
|
||||||
ADD pip-requirements.txt /tmp/pip-requirements.txt
|
ADD pip-requirements.txt /tmp/pip-requirements.txt
|
||||||
RUN pip install -r /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
|
&& rm -rf drawio-amd64-${DRAWIO_VERSION}.deb
|
||||||
ENV XVFB_DISPLAY ":42"
|
ENV XVFB_DISPLAY ":42"
|
||||||
|
|
||||||
|
FROM dev as prod
|
||||||
|
|
||||||
# Bundle app source
|
# Bundle app source
|
||||||
# COPY . .
|
COPY . .
|
||||||
# RUN ablog build
|
RUN ablog build
|
||||||
|
|
||||||
EXPOSE 8090
|
EXPOSE 8090
|
||||||
CMD [ "ablog", "serve", "-p", "8090" ]
|
CMD [ "ablog", "serve", "-p", "8090" ]
|
||||||
|
|
Loading…
Reference in a new issue