refactor: adopt portigo infrastructure patterns
Add config package with build-tag-switched dev/prod environments, structured logging via zerolog, Taskfile for dev workflow, golangci-lint config, testutil package, and improved DB setup with proper SQLite pragmas and cleanup. Rename sqlc output package from gen to repository. Switch to allowlist .gitignore, Alpine+UPX+scratch Dockerfile, and CI pipeline with test/lint gates before deploy.
This commit is contained in:
40
.gitignore
vendored
40
.gitignore
vendored
@@ -1,8 +1,34 @@
|
||||
c4
|
||||
c4.db
|
||||
data/
|
||||
.env
|
||||
# Allowlisting gitignore: ignore everything, then un-ignore what we track.
|
||||
# source: https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
|
||||
|
||||
# Deploy artifacts
|
||||
c4-deploy-*.tar.gz
|
||||
c4-deploy-*_b64*.txt
|
||||
# Ignore everything
|
||||
*
|
||||
|
||||
# But not these files...
|
||||
!.gitignore
|
||||
|
||||
!*.go
|
||||
!*.sql
|
||||
!go.sum
|
||||
!go.mod
|
||||
!Taskfile.yml
|
||||
!sqlc.yaml
|
||||
!.golangci.yml
|
||||
!.gitea/workflows/*.yml
|
||||
|
||||
!.env.example
|
||||
!LICENSE
|
||||
|
||||
!assets/**/*
|
||||
|
||||
# Generated CSS stays out of version control
|
||||
assets/css/output.css
|
||||
|
||||
# Deploy scripts and configs
|
||||
!deploy/*.sh
|
||||
!deploy/*.service
|
||||
!docker-compose.yml
|
||||
!Dockerfile
|
||||
|
||||
# ...even if they are in subdirectories
|
||||
!*/
|
||||
|
||||
Reference in New Issue
Block a user