feat: Raspberry Pi deployment — Dockerfile, CI/CD workflows, actuator
Some checks failed
CI / Build & test backend (push) Failing after 13m38s
Some checks failed
CI / Build & test backend (push) Failing after 13m38s
Backend: - backend/Dockerfile: multi-stage build (local + ci-image targets) - eclipse-temurin:21-jre-alpine runtime, non-root user caloriecounter - DOCKER_BUILDKIT=0 + native JAR build pattern for ARM64 Pi runner - pom.xml: add spring-boot-starter-actuator - application.yml: expose /actuator/health (liveness probe for Docker healthcheck) CI/CD: - .gitea/workflows/ci.yml: Maven test on pi-runner (push + PR) - .gitea/workflows/docker.yml: build + push calorie-counter-api:latest/:sha - Triggers after CI passes (workflow_run) to avoid OOM on single-capacity Pi - Docker login before Maven build (avoids daemon timeout after heavy CPU) - Deploys immediately via docker.sock to /home/andris/homelab/calorie-counter/ Mobile: - api.ts: update baseURL default to https://calories.amlab.dev (LAN fallback: http://10.18.1.135:8085 via WireGuard) Homelab changes pushed directly via Gitea MCP: - homelab/calorie-counter/docker-compose.yml (port 8085, 120s start_period) - homelab/calorie-counter/.env.example - homelab/.gitea/workflows/deploy-calorie-counter.yml (cron every 10 min) - homelab/backup/backup.sh (added calorie-counter pg_dump)
This commit is contained in:
42
.gitea/workflows/ci.yml
Normal file
42
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,42 @@
|
||||
# Generated by GitHub Copilot
|
||||
#
|
||||
# ci.yml — Build and test the calorie-counter backend
|
||||
#
|
||||
# Runs on every push to main and every PR targeting main.
|
||||
# Produces a green/red signal that docker.yml waits for before building images.
|
||||
#
|
||||
# Runs on pi-runner (native ARM64) — no QEMU, no cross-compilation overhead.
|
||||
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
# Cancel any in-progress CI run for the same ref so the single-capacity Pi
|
||||
# runner is not blocked by a superseded run.
|
||||
concurrency:
|
||||
group: ci-${{ gitea.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Build & test backend
|
||||
runs-on: pi-runner
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Java 21 LTS
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '21'
|
||||
cache: maven
|
||||
|
||||
- name: Run tests
|
||||
working-directory: backend
|
||||
run: mvn -q -ntp clean verify
|
||||
Reference in New Issue
Block a user