diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..345a0ae --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,18 @@ +when: + branch: high-performance + event: push + +steps: + - name: build-and-push + image: woodpeckerci/plugin-docker-buildx + settings: + registry: ghcr.io + repo: ghcr.io/traceworks2023/nxtgauge-admin-solid + dockerfile: Dockerfile + tags: + - high-performance-latest + username: + from_secret: GHCR_USERNAME + password: + from_secret: GHCR_TOKEN + platforms: linux/amd64 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..739f4f1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM node:20-alpine AS builder +WORKDIR /app + +COPY package*.json ./ +RUN npm ci + +COPY . . +RUN npm run build + +FROM node:20-alpine +WORKDIR /app + +COPY --from=builder /app/.output ./.output + +ENV PORT=3000 +ENV HOST=0.0.0.0 +EXPOSE 3000 + +CMD ["node", ".output/server/index.mjs"]