Replace the Woodpecker pipelines with Actions workflows under `.github/workflows`, matching the conventions the other migrated repositories now use (butterrobot, smtp2shoutrrr, terraria-companion, dharma). ## Workflows - Jobs run on `ubuntu-latest`, answered with the catthehacker act image — no `ci-base` container. - Short `uses:` resolves against github.com, so every action carries its real name: `goreleaser/goreleaser-action`, `oven-sh/setup-bun`, `docker/setup-qemu-action`, `docker/setup-buildx-action`. - The act image carries none of the tooling `ci-base` provided, so each job installs what it calls: `make` everywhere, `build-essential` for the CGO test job, `upx-ucl` for goreleaser's `upx` block, bun for the webapp build, goreleaser itself for `make build`. - `e2e` gets a Docker-in-Docker service so testcontainers can resolve its mapped ports from inside the job container; Playwright installs with `--with-deps` now that the job has sudo. ## Supporting changes - `Makefile` drops unused variables and adopts a self-documenting `help` target. - `.goreleaser.yml` keeps `dockers_v2` for the multi-platform image. - `Containerfile` moves to Alpine 3.23; nfpm description fixed. - e2e: shared Docker network so link creation reaches the test web server, `mattn/go-sqlite3` added to the e2e module, `all:dist` embed directive so dot-files ship in the webapp bundle. Reviewed-on: #1
37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
services:
|
|
hako:
|
|
# Note: Build the Docker image via goreleaser:
|
|
# Run: make build-docker
|
|
build:
|
|
context: .
|
|
dockerfile: Containerfile
|
|
container_name: hako
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8080:8080"
|
|
environment:
|
|
# Database configuration
|
|
- DATABASE_URL=sqlite:/app/data/hako.db
|
|
# Archive storage path
|
|
- ARCHIVE_STORAGE_PATH=/app/data/data
|
|
# Server configuration
|
|
- SERVER_PORT=8080
|
|
# JWT configuration (REQUIRED - set this in production!)
|
|
- JWT_SECRET=${JWT_SECRET:-change-me-in-production}
|
|
- JWT_EXPIRATION=24h
|
|
# Logging
|
|
- ENABLE_ACCESS_LOG=true
|
|
volumes:
|
|
# Data persistence for database and archives
|
|
- ./devdata:/app/data
|
|
# Optional: Configuration file (can also use environment variables)
|
|
- ./devdata/config.yaml:/app/config/config.yaml:ro
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/system"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
# Optional: Uncomment to use a config file instead of environment variables
|
|
# command: ["server", "--config", "/app/config/config.yaml"]
|
|
|