From 6a59de3e0a3cc8c923e64c52bc5e5cd51fbaece5 Mon Sep 17 00:00:00 2001 From: log101 Date: Sun, 2 Mar 2025 09:33:51 +0300 Subject: [PATCH] ci: revert to sing arch build --- .gitea/workflows/static-deploy.yml | 8 -------- Dockerfile | 12 ++++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/.gitea/workflows/static-deploy.yml b/.gitea/workflows/static-deploy.yml index e23e6cd..8379cc3 100644 --- a/.gitea/workflows/static-deploy.yml +++ b/.gitea/workflows/static-deploy.yml @@ -13,15 +13,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - with: - driver: docker-container - platforms: linux/amd64 # Target standard PC architecture - install: true - name: Log in to private registry uses: docker/login-action@v3 @@ -40,7 +33,6 @@ jobs: uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64 # Explicitly specify target architecture push: ${{ gitea.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.TAG }} # Add build caching for faster builds diff --git a/Dockerfile b/Dockerfile index 5e285b2..32bff45 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,11 @@ -# Use build arguments for platform specification -ARG BUILDPLATFORM=linux/amd64 - -# First stage: build -FROM --platform=${BUILDPLATFORM} node:22-bullseye-slim AS build +FROM oven/bun AS build WORKDIR /app COPY package*.json ./ -RUN npm install +RUN bun install COPY . . -RUN npm run build +RUN bun run build -FROM --platform=${BUILDPLATFORM} nginx:alpine AS runtime +FROM nginx:alpine AS runtime COPY ./nginx/nginx.conf /etc/nginx/nginx.conf COPY --from=build /app/dist /usr/share/nginx/html EXPOSE 8080