Setting up workflow
Some checks failed
Build Docker Image and Deploy / build-and-push-image (push) Failing after 2m11s

- Added COPYING (LICENSE)
- Added Dockerfile
  - Automated build on push to main
  - Push docker container to local registry
This commit is contained in:
2024-07-07 20:33:35 +02:00
parent 16d493c820
commit 525faf34e6
4 changed files with 312 additions and 4 deletions

25
Dockerfile Normal file
View File

@ -0,0 +1,25 @@
FROM node:lts-slim AS build
WORKDIR /app
COPY package.json package.json
RUN npm install
COPY public/ public
COPY src/ src
COPY astro.config.mjs astro.config.mjs
COPY tailwind.config.mjs tailwind.config.mjs
COPY tsconfig.json tsconfig.json
COPY components.json components.json
RUN npm run build
FROM node:lts-slim as prod
WORKDIR /app
COPY --from=build /app/dist /app/dist
COPY --from=build /app/package.json /app/package.json
COPY --from=build /app/package-lock.json /app/package-lock.json
RUN npm ci
EXPOSE 4321
CMD ["npm", "run", "preview"]