Skip to content

Commit 623d0b9

Browse files
committed
chore: harden railway deployment and add release-please
1 parent 7062bf3 commit 623d0b9

9 files changed

Lines changed: 98 additions & 0 deletions

File tree

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.git
2+
.gitignore
3+
.env
4+
.env.*
5+
docker-compose.yml
6+
data/
7+
*.md
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: release-please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
9+
permissions:
10+
contents: write
11+
issues: write
12+
pull-requests: write
13+
14+
jobs:
15+
release-please:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: googleapis/release-please-action@v4
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
config-file: release-please-config.json
22+
manifest-file: .release-please-manifest.json

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,21 @@
22

33
!/.env
44
!/.gitignore
5+
!/.dockerignore
6+
!/.github/
7+
!/.github/workflows/
8+
!/.github/workflows/release-please.yml
59
!/CONTRIBUTING.md
610
!/docker-compose.yml
711
!/Dockerfile
812
!/LICENSE
913
!/railwayapp-grafana.png
1014
!/README.md
15+
!/railway.toml
16+
!/release-please-config.json
17+
!/.release-please-manifest.json
18+
!/CHANGELOG.md
19+
!/version.txt
1120

1221
# Environment variables
1322
.env

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.1.0"
3+
}

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ Grafana is a multi-platform, feature rich metrics dashboard and graph editor for
1010
* Grafana with automated setup
1111
* Grafana UI
1212
* Password Authentication (Set username & password in environment variables)
13+
* Railway config as code via `railway.toml`
14+
15+
## Production recommendations (Railway)
16+
17+
* Set strong `GF_SECURITY_ADMIN_PASSWORD` in Railway Variables
18+
* Persist `/var/lib/grafana` with a Railway volume
19+
* Keep healthcheck path at `/api/health`
20+
* Restrict plugin list in `GF_INSTALL_PLUGINS` to required plugins only
1321

1422
## 🐍 How to Deploy
1523

railway.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[build]
2+
builder = "DOCKERFILE"
3+
4+
[deploy]
5+
startCommand = "sh -c 'export GF_SERVER_HTTP_PORT=${PORT:-3000}; /run.sh'"
6+
healthcheckPath = "/api/health"
7+
healthcheckTimeout = 300
8+
restartPolicyType = "ON_FAILURE"
9+
restartPolicyMaxRetries = 10

release-please-config.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"release-type": "simple",
4+
"changelog-sections": [
5+
{
6+
"type": "feat",
7+
"section": "Features",
8+
"hidden": false
9+
},
10+
{
11+
"type": "fix",
12+
"section": "Bug Fixes",
13+
"hidden": false
14+
},
15+
{
16+
"type": "refactor",
17+
"section": "Refactoring",
18+
"hidden": false
19+
},
20+
{
21+
"type": "docs",
22+
"section": "Documentation",
23+
"hidden": false
24+
},
25+
{
26+
"type": "test",
27+
"section": "Tests",
28+
"hidden": false
29+
},
30+
{
31+
"type": "chore",
32+
"section": "Chores",
33+
"hidden": false
34+
}
35+
]
36+
}

version.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.1.0

0 commit comments

Comments
 (0)