From 14470da7dc8f4d5ec7027c94e961d50a91139e4e Mon Sep 17 00:00:00 2001 From: florianfederspiel Date: Tue, 19 May 2026 22:01:54 +0200 Subject: [PATCH] KI-AGENT: Webseite in Docker-Workflow aufgenommen --- .gitea/workflows/build-push.yaml | 34 +++++++++++++++++++++++++++++++- website/.dockerignore | 6 ++++++ website/Dockerfile | 19 ++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 website/.dockerignore create mode 100644 website/Dockerfile diff --git a/.gitea/workflows/build-push.yaml b/.gitea/workflows/build-push.yaml index 1c5e216..a45c6c8 100644 --- a/.gitea/workflows/build-push.yaml +++ b/.gitea/workflows/build-push.yaml @@ -1,5 +1,5 @@ name: Build and Push Docker Images -run-name: Build Backend, Frontend & Docs by @${{ github.actor }} +run-name: Build Backend, Frontend, Website & Docs by @${{ github.actor }} on: [push] @@ -135,3 +135,35 @@ jobs: push: true tags: ${{ steps.meta-docs.outputs.tags }} labels: ${{ steps.meta-docs.outputs.labels }} + + build-website: + #needs: verify-docs-sync + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + + - name: Log in to Docker Registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY_HOST }} + username: ${{ env.ACTOR }} + password: ${{ vars.CI_TOKEN }} + + - name: Extract metadata (tags, labels) for Website + id: meta-website + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY_HOST }}/${{ env.IMAGE_NAME }}/website + tags: | + type=ref,event=branch + type=ref,event=tag + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} + + - name: Build and push Website + uses: docker/build-push-action@v4 + with: + context: ./website + push: true + tags: ${{ steps.meta-website.outputs.tags }} + labels: ${{ steps.meta-website.outputs.labels }} diff --git a/website/.dockerignore b/website/.dockerignore new file mode 100644 index 0000000..a78c7d7 --- /dev/null +++ b/website/.dockerignore @@ -0,0 +1,6 @@ +node_modules +.nuxt +.output +.data +.env +npm-debug.log* diff --git a/website/Dockerfile b/website/Dockerfile new file mode 100644 index 0000000..a37c613 --- /dev/null +++ b/website/Dockerfile @@ -0,0 +1,19 @@ +FROM node:20-alpine AS builder +WORKDIR /app/website + +COPY package.json package-lock.json ./ +RUN npm ci + +COPY . ./ +RUN npm run build + +FROM node:20-alpine AS runner +WORKDIR /app/website +ENV NODE_ENV=production +ENV NUXT_HOST=0.0.0.0 +ENV NUXT_PORT=3000 + +COPY --from=builder /app/website/.output ./.output + +EXPOSE 3000 +CMD ["node", ".output/server/index.mjs"]