Files
cameleer-deploy-demo/Dockerfile
hsiegeln 5bbec1e52a
Some checks failed
CI / build (push) Failing after 20s
CI / docker (push) Has been skipped
CI / deploy (push) Has been skipped
feat: CI/CD workflow, Dockerfile, and K8s deployment
- Multi-stage Dockerfile (Maven + Node build, JRE runtime)
- Gitea Actions CI: build → docker → deploy
- K8s manifests: Deployment, Service (NodePort 30082), Ingress
- ServiceAccount + RBAC for kubectl access from pod
- Docker socket mount for image builds
- Ingress at deploy.cameleer.siegeln.net
- SPA config for serving frontend from Spring Boot
- cameleer-demo namespace for deployed apps

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 09:44:49 +02:00

28 lines
829 B
Docker

FROM --platform=$BUILDPLATFORM maven:3.9-eclipse-temurin-21 AS backend-build
WORKDIR /build
COPY pom.xml .
RUN mvn dependency:go-offline -B || true
COPY src/ src/
RUN mvn clean package -DskipTests -B
FROM --platform=$BUILDPLATFORM node:22-alpine AS ui-build
WORKDIR /ui
ARG REGISTRY_TOKEN
COPY ui/package.json ui/package-lock.json ui/.npmrc ./
RUN echo "//gitea.siegeln.net/api/packages/cameleer/npm/:_authToken=${REGISTRY_TOKEN}" >> .npmrc && \
npm ci
COPY ui/ .
RUN npm run build
FROM eclipse-temurin:21-jre
WORKDIR /app
COPY --from=backend-build /build/target/cameleer-deploy-demo-*.jar /app/server.jar
COPY --from=ui-build /ui/dist /app/static
EXPOSE 8082
ENV TZ=UTC
ENTRYPOINT exec java -Duser.timezone=UTC \
-Dserver.port=8082 \
-Dspring.web.resources.static-locations=file:/app/static/ \
-jar /app/server.jar