From ec8e8b9dffe5a8c5d42f5f9de5a8f8e0c855dba8 Mon Sep 17 00:00:00 2001 From: jc <46619361+juancwu@users.noreply.github.com> Date: Thu, 14 Nov 2024 22:35:41 -0500 Subject: [PATCH] create a share volume to gain access to fe build files --- .github/scripts/deploy-preview.sh | 1 + Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/scripts/deploy-preview.sh b/.github/scripts/deploy-preview.sh index 9c0df6c..d0cdd17 100644 --- a/.github/scripts/deploy-preview.sh +++ b/.github/scripts/deploy-preview.sh @@ -66,6 +66,7 @@ docker run -d \ --name $APP_NAME \ --env-file .env \ --network=host --add-host=host.docker.internal:host-gateway \ + -v ~/dist:/root/static/dist \ $APP_NAME:latest echo "Done: Preview Deployment" diff --git a/Dockerfile b/Dockerfile index 4aeba8a..43c3e64 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ FROM alpine:3.20 RUN apk --no-cache add ca-certificates WORKDIR /root/ COPY --from=builder /app/app . +RUN mkdir -p static/dist EXPOSE 6969 ENV APP_ENV="production" CMD ["./app"]