Skip to content

Commit e64c97d

Browse files
committed
chore: add base configuration files
1 parent f745b1a commit e64c97d

File tree

5 files changed

+272
-0
lines changed

5 files changed

+272
-0
lines changed

.air.toml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
root = "."
2+
testdata_dir = "testdata"
3+
tmp_dir = "tmp"
4+
5+
[build]
6+
args_bin = ["--config", "./config.yaml"]
7+
bin = "./tmp/mcpulse"
8+
cmd = "bash -c 'go build -o ./tmp/mcpulse cmd/mcpulse/main.go'"
9+
delay = 1000
10+
exclude_dir = ["tmp", "vendor", "testdata", "data", "logs", "docs", "dist", "node_modules", ".ven", "web", "sdks"]
11+
exclude_file = []
12+
exclude_regex = ["_test.go"]
13+
exclude_unchanged = false
14+
follow_symlink = false
15+
full_bin = ""
16+
include_dir = []
17+
include_ext = ["go", "tpl", "tmpl", "html", ".json", ".js", ".css"]
18+
include_file = []
19+
kill_delay = "1s"
20+
log = "build-errors.log"
21+
poll = false
22+
poll_interval = 0
23+
post_cmd = []
24+
pre_cmd = []
25+
rerun = false
26+
rerun_delay = 500
27+
send_interrupt = true
28+
stop_on_error = true
29+
30+
[color]
31+
app = ""
32+
build = "yellow"
33+
main = "magenta"
34+
runner = "green"
35+
watcher = "cyan"
36+
37+
[log]
38+
main_only = false
39+
silent = false
40+
time = false
41+
42+
[misc]
43+
clean_on_exit = false
44+
45+
[proxy]
46+
app_port = 0
47+
enabled = false
48+
proxy_port = 0
49+
50+
[screen]
51+
clear_on_rebuild = false
52+
keep_scroll = true

.dockerignore

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Git
2+
.git
3+
.gitignore
4+
.github
5+
6+
# Documentation
7+
docs
8+
*.md
9+
LICENSE
10+
11+
# Development files
12+
.vscode
13+
.idea
14+
*.swp
15+
*.swo
16+
*~
17+
18+
# Test files
19+
**/*_test.go
20+
**/testdata
21+
coverage.out
22+
coverage.html
23+
24+
# Examples
25+
**/examples
26+
27+
# Frontend (will be built separately)
28+
web/node_modules
29+
web/dist
30+
web/.vite
31+
32+
# SDKs (separate repos)
33+
sdks
34+
35+
# Scripts
36+
scripts
37+
38+
# Docker
39+
docker-compose.yml
40+
.dockerignore
41+
Dockerfile
42+
docker
43+
44+
# Environment files
45+
.env
46+
.env.*
47+
*.env
48+
49+
# Temporary files
50+
tmp
51+
temp
52+
*.tmp
53+
54+
# Build artifacts
55+
bin
56+
dist
57+
build
58+
59+
# OS files
60+
.DS_Store
61+
Thumbs.db

.env.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Database Configuration
2+
DB_PASSWORD=changeme
3+
4+
# JWT Secret (generate with: openssl rand -hex 32)
5+
JWT_SECRET=changeme_this_secret_key
6+
7+
# Grafana
8+
GRAFANA_PASSWORD=admin

.gitignore

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Binaries
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
mcpulse
8+
mcpulse-server
9+
mcpulse-proxy
10+
11+
# Test binary, built with `go test -c`
12+
*.test
13+
14+
# Output of the go coverage tool
15+
*.out
16+
17+
# Dependency directories
18+
vendor/
19+
20+
# Go workspace file
21+
go.work
22+
23+
# IDE
24+
.idea/
25+
.vscode/
26+
*.swp
27+
*.swo
28+
*~
29+
30+
# OS
31+
.DS_Store
32+
Thumbs.db
33+
34+
# Configuration
35+
config.yaml
36+
*.env
37+
.env.local
38+
39+
# Database
40+
*.db
41+
*.sqlite
42+
43+
# Logs
44+
*.log
45+
46+
# Frontend
47+
web/node_modules/
48+
web/dist/
49+
web/.vite/
50+
web/build/
51+
internal/server/web/dist/assets/
52+
internal/server/web/dist/index.html
53+
54+
# Documentation site
55+
docs/node_modules/
56+
docs/build/
57+
58+
# Embedded assets
59+
internal/assets/
60+
61+
# Temporary files
62+
tmp/
63+
temp/
64+
sdks/**
65+
PRD.md

.goreleaser.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
version: 2
2+
3+
before:
4+
hooks:
5+
- go mod tidy
6+
- bash -c "cd web && npm ci && npm run build"
7+
8+
builds:
9+
- env:
10+
- CGO_ENABLED=0
11+
goos:
12+
- linux
13+
- darwin
14+
- windows
15+
goarch:
16+
- amd64
17+
- arm64
18+
main: ./cmd/mcpulse
19+
binary: mcpulse
20+
ldflags:
21+
- -s -w -X github.com/sirrobot01/mcpulse/internal/version={{.Version}}
22+
23+
archives:
24+
- format: tar.gz
25+
name_template: >-
26+
{{ .ProjectName }}_
27+
{{- title .Os }}_
28+
{{- if eq .Arch "amd64" }}x86_64
29+
{{- else if eq .Arch "386" }}i386
30+
{{- else }}{{ .Arch }}{{ end }}
31+
{{- if .Arm }}v{{ .Arm }}{{ end }}
32+
format_overrides:
33+
- goos: windows
34+
format: zip
35+
36+
checksum:
37+
name_template: 'checksums.txt'
38+
39+
snapshot:
40+
name_template: "{{ incpatch .Version }}-next"
41+
42+
changelog:
43+
sort: asc
44+
filters:
45+
exclude:
46+
- '^docs:'
47+
- '^test:'
48+
- '^ci:'
49+
- '^build:'
50+
- '^style:'
51+
- '^refactor:'
52+
- Merge pull request
53+
- Merge branch
54+
55+
release:
56+
github:
57+
owner: sirrobot01
58+
name: mcpulse
59+
draft: false
60+
prerelease: auto
61+
mode: replace
62+
header: |
63+
## McPulse {{ .Tag }}
64+
Welcome to this new release of Mcpulse!
65+
66+
footer: |
67+
## Docker Images
68+
69+
Docker images are available on [GitHub Container Registry](https://github.com/sirrobot01/mcpulse/pkgs/container/mcpulse).
70+
71+
```bash
72+
docker pull ghcr.io/sirrobot01/mcpulse:{{ .Tag }}
73+
```
74+
75+
dockers:
76+
- image_templates:
77+
- "ghcr.io/sirrobot01/mcpulse:{{ .Tag }}"
78+
- "ghcr.io/sirrobot01/mcpulse:latest"
79+
dockerfile: docker/Dockerfile.goreleaser
80+
build_flag_templates:
81+
- "--pull"
82+
- "--label=org.opencontainers.image.created={{.Date}}"
83+
- "--label=org.opencontainers.image.title={{.ProjectName}}"
84+
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
85+
- "--label=org.opencontainers.image.version={{.Version}}"
86+
- "--platform=linux/amd64"

0 commit comments

Comments
 (0)