feat: bring repo up to REPO_POLICIES standards
All checks were successful
check / check (push) Successful in 2m19s
All checks were successful
check / check (push) Successful in 2m19s
- Create cmd/webhooker/main.go with fx dependency injection wiring - Add REPO_POLICIES.md, .editorconfig, .dockerignore - Add .gitea/workflows/check.yml for CI (docker build on push) - Rewrite Makefile with all required targets (test, lint, fmt, fmt-check, check, build, hooks, docker, clean, dev, run, deps) - Rewrite Dockerfile with sha256-pinned base images, golangci-lint installed from verified release archive, make check as build step - Fix README.md: add required sections (description, getting started, rationale, design, TODO, license, author) - Integrate TODO.md content into README.md and remove TODO.md - Move config.yaml to configs/config.yaml.example - Fix .gitignore pattern for webhooker binary - Fix static/static.go embed directive (remove empty vendor dir) - Fix database test to use in-memory config (no filesystem dependency) closes #1 closes #2
This commit is contained in:
50
configs/config.yaml.example
Normal file
50
configs/config.yaml.example
Normal file
@@ -0,0 +1,50 @@
|
||||
environments:
|
||||
dev:
|
||||
config:
|
||||
port: 8080
|
||||
debug: true
|
||||
maintenanceMode: false
|
||||
developmentMode: true
|
||||
environment: dev
|
||||
# Database URL for local development
|
||||
dburl: postgres://webhooker:webhooker@localhost:5432/webhooker_dev?sslmode=disable
|
||||
# Basic auth for metrics endpoint in dev
|
||||
metricsUsername: admin
|
||||
metricsPassword: admin
|
||||
# Dev admin credentials for testing
|
||||
devAdminUsername: devadmin
|
||||
devAdminPassword: devpassword
|
||||
secrets:
|
||||
# Use default insecure session key for development
|
||||
sessionKey: d2ViaG9va2VyLWRldi1zZXNzaW9uLWtleS1pbnNlY3VyZSE=
|
||||
# Sentry DSN - usually not needed in dev
|
||||
sentryDSN: ""
|
||||
|
||||
prod:
|
||||
config:
|
||||
port: $ENV:PORT
|
||||
debug: $ENV:DEBUG
|
||||
maintenanceMode: $ENV:MAINTENANCE_MODE
|
||||
developmentMode: false
|
||||
environment: prod
|
||||
dburl: $ENV:DBURL
|
||||
metricsUsername: $ENV:METRICS_USERNAME
|
||||
metricsPassword: $ENV:METRICS_PASSWORD
|
||||
# Dev admin credentials should not be set in production
|
||||
devAdminUsername: ""
|
||||
devAdminPassword: ""
|
||||
secrets:
|
||||
sessionKey: $ENV:SESSION_KEY
|
||||
sentryDSN: $ENV:SENTRY_DSN
|
||||
|
||||
configDefaults:
|
||||
# These defaults apply to all environments unless overridden
|
||||
port: 8080
|
||||
debug: false
|
||||
maintenanceMode: false
|
||||
developmentMode: false
|
||||
environment: dev
|
||||
metricsUsername: ""
|
||||
metricsPassword: ""
|
||||
devAdminUsername: ""
|
||||
devAdminPassword: ""
|
||||
Reference in New Issue
Block a user