From d13d93b67635a56a9194af47b76d103b209c18ff Mon Sep 17 00:00:00 2001 From: Annika Merris Date: Sun, 4 Feb 2024 17:54:51 -0500 Subject: [PATCH] Adjusted Dockerfile To Support Building In Docker --- .forgejo/workflows/build.yml | 2 +- Dockerfile | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index 75e7024..b3bbb18 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -65,7 +65,7 @@ jobs: with: shell_command: /bin/ash -c image: ${{ fromJSON(steps.meta.outputs.json).tags[0] }} - path: isl-api + path: /dist destination: dist - name: Create a Release uses: https://forgejo.merr.is/actions/forgejo-release@alpinev1 diff --git a/Dockerfile b/Dockerfile index 4784572..8a57cda 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,11 @@ -FROM nginx:stable-alpine -COPY docker/nginx.conf /etc/nginx/nginx.conf -COPY ./dist /usr/share/nginx/html \ No newline at end of file +FROM oven/bun:1-alpine as build-stage + +WORKDIR /app +COPY . /app +RUN bun install +RUN bun run build + +FROM nginx:stable-alpine as release + +COPY --from=build-stage /app/docker/nginx.conf /etc/nginx/nginx.conf +COPY --from=build-stage /app/dist /usr/share/nginx/html