Replace Woodpecker CI pipelines with GitHub/Forgejo Actions workflows using the ci-base:1.0.0 image. Simplify Makefile by removing unused variables and adopting a cleaner help target. Switch goreleaser from dockers_v2 to dockers + docker_manifests for per-arch image builds. Update Containerfile to Alpine 3.23 and fix nfpm description.
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"]
|
|
|