Some checks failed
CI / goreleaser-lint (push) Successful in 12s
CI / format (push) Successful in 2m34s
CI / lint (push) Successful in 5m49s
CI / build (push) Successful in 3m18s
CI / test (push) Successful in 7m4s
Release / release (push) Failing after 5m55s
CI / e2e (push) Successful in 25m30s
goreleaser's dockers_v2 stages artifacts under <os>/<arch>[/<variant>]/ in the build context, so the Containerfile resolves the binary through TARGETPLATFORM instead of the context root. docker-compose consumes the goreleaser-built image, since a plain `docker build` cannot provide that per-platform context.
35 lines
1.3 KiB
YAML
35 lines
1.3 KiB
YAML
services:
|
|
hako:
|
|
# The image is produced by goreleaser (the Containerfile expects its
|
|
# per-platform build context). Run `make build-docker` to build it locally.
|
|
image: git.nakama.town/fmartingr/hako:latest
|
|
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"]
|
|
|