2 Commits

Author SHA1 Message Date
tueem fbe10a0288 feat(docker): adjust entrypoint.sh for new imprinturl flag
docker / docker (push) Successful in 4m48s
build / Go-Build (push) Failing after 51s
2026-06-24 12:12:51 +02:00
tueem bfafd63b33 feat(ci): add frontend build stage 2026-06-24 12:12:38 +02:00
3 changed files with 28 additions and 0 deletions
+15
View File
@@ -28,6 +28,21 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v5 uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 26
cache: 'npm'
cache-dependency-path: ./frontend/package-lock.json
- name: Install Dependencies
working-directory: ./frontend
run: npm ci
- name: Run Vite Build
working-directory: ./frontend
run: npm run build
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v6 uses: actions/setup-go@v6
with: with:
+9
View File
@@ -1,9 +1,18 @@
# Frontend build stage
FROM node:22-alpine AS frontend-builder
WORKDIR /app
COPY frontend/package*.json ./
RUN npm ci
COPY frontend/ .
RUN npm run build
# Build stage # Build stage
FROM golang:latest AS builder FROM golang:latest AS builder
WORKDIR /app WORKDIR /app
COPY go.mod go.sum ./ COPY go.mod go.sum ./
RUN go mod download RUN go mod download
COPY . . COPY . .
COPY --from=frontend-builder /app/dist ./frontend/dist
RUN CGO_ENABLED=0 GOOS=linux go build -v -o outfit-voting-abi26 ./cmd/ RUN CGO_ENABLED=0 GOOS=linux go build -v -o outfit-voting-abi26 ./cmd/
# Final stage # Final stage
+4
View File
@@ -42,4 +42,8 @@ if [ -n "$SIGNINGKEY" ]; then
CMD="$CMD --signingKey $SIGNINGKEY" CMD="$CMD --signingKey $SIGNINGKEY"
fi fi
if [ -n "$IMPRINTURL" ]; then
CMD="$CMD --imprinturl $IMPRINTURL"
fi
eval exec $CMD "$@" eval exec $CMD "$@"