Skip to content

Commit f729b80

Browse files
author
Jeremie Zitti
committed
feat: initial commit — Docker Compose + OpenTofu 1.8 + Coolify + Prom/Grafana/Loki + CI/CD
0 parents  commit f729b80

32 files changed

Lines changed: 858 additions & 0 deletions

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
APP_PORT=8000
2+
GRAFANA_PORT=3000
3+
GRAFANA_ADMIN_PASSWORD=changeme
4+
PROMETHEUS_PORT=9090
5+
LOKI_PORT=3100

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Summary
2+
3+
## Checklist
4+
5+
- [ ] Style follows the project
6+
- [ ] `docker compose config -q` passes
7+
- [ ] `tofu fmt` + `tofu validate` pass (if infra changed)
8+
- [ ] `pytest` passes (if app changed)
9+
- [ ] Conventional Commits

.github/dependabot.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/app"
5+
schedule: { interval: "weekly", day: "monday" }
6+
open-pull-requests-limit: 5
7+
labels: ["dependencies"]
8+
9+
- package-ecosystem: "terraform"
10+
directory: "/infra/tofu"
11+
schedule: { interval: "weekly", day: "monday" }
12+
open-pull-requests-limit: 3
13+
labels: ["dependencies", "infra"]
14+
15+
- package-ecosystem: "github-actions"
16+
directory: "/"
17+
schedule: { interval: "weekly", day: "monday" }
18+
open-pull-requests-limit: 3
19+
labels: ["dependencies", "ci"]
20+
21+
- package-ecosystem: "docker"
22+
directory: "/app"
23+
schedule: { interval: "weekly", day: "monday" }
24+
open-pull-requests-limit: 3
25+
labels: ["dependencies", "docker"]

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
app:
11+
name: App (Python)
12+
runs-on: ubuntu-24.04
13+
defaults:
14+
run:
15+
working-directory: app
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.12"
21+
- run: pip install -r requirements.txt
22+
- run: python -m pytest -q
23+
24+
tofu:
25+
name: OpenTofu fmt+validate
26+
runs-on: ubuntu-24.04
27+
defaults:
28+
run:
29+
working-directory: infra/tofu
30+
steps:
31+
- uses: actions/checkout@v4
32+
- uses: opentofu/setup-opentofu@v1
33+
with:
34+
tofu_version: "1.8.0"
35+
- run: tofu fmt -check -recursive
36+
- run: tofu init -backend=false
37+
- run: tofu validate
38+
39+
compose:
40+
name: docker compose sanity
41+
runs-on: ubuntu-24.04
42+
steps:
43+
- uses: actions/checkout@v4
44+
- run: docker compose config -q

.github/workflows/deploy.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "app/**"
8+
- ".github/workflows/deploy.yml"
9+
10+
jobs:
11+
build-and-push:
12+
name: Build multi-arch image and push to GHCR
13+
runs-on: ubuntu-24.04
14+
permissions:
15+
contents: read
16+
packages: write
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: docker/setup-qemu-action@v3
20+
- uses: docker/setup-buildx-action@v3
21+
- uses: docker/login-action@v3
22+
with:
23+
registry: ghcr.io
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
- uses: docker/build-push-action@v6
27+
with:
28+
context: ./app
29+
platforms: linux/amd64,linux/arm64
30+
push: true
31+
tags: |
32+
ghcr.io/${{ github.repository_owner }}/starter-devops-app:latest
33+
ghcr.io/${{ github.repository_owner }}/starter-devops-app:${{ github.sha }}
34+
35+
trigger-coolify:
36+
name: Trigger Coolify redeploy
37+
needs: build-and-push
38+
runs-on: ubuntu-24.04
39+
if: ${{ vars.COOLIFY_WEBHOOK_URL != '' }}
40+
steps:
41+
- name: Ping Coolify webhook
42+
env:
43+
WEBHOOK: ${{ secrets.COOLIFY_WEBHOOK_URL }}
44+
TOKEN: ${{ secrets.COOLIFY_WEBHOOK_TOKEN }}
45+
run: |
46+
curl -fsS -X POST "$WEBHOOK" \
47+
-H "Authorization: Bearer $TOKEN" \
48+
-H "Content-Type: application/json" \
49+
-d '{"ref":"main"}'

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Python (app)
2+
app/__pycache__/
3+
app/.venv/
4+
app/*.egg-info/
5+
6+
# Tofu / Terraform
7+
infra/tofu/.terraform/
8+
infra/tofu/.terraform.lock.hcl
9+
infra/tofu/*.tfstate*
10+
infra/tofu/*.tfvars
11+
!infra/tofu/*.tfvars.example
12+
13+
# Grafana runtime
14+
infra/monitoring/grafana/data/
15+
16+
# Env
17+
.env
18+
.env.local
19+
!.env.example
20+
21+
# IDE
22+
.idea/
23+
.vscode/
24+
.DS_Store
25+
Thumbs.db
26+
*.log

CODE_OF_CONDUCT.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Code of Conduct
2+
3+
This project follows the [Skilluv Community Charter](https://github.com/skilluv-community/community-charter/blob/main/community-code-of-conduct.md).
4+
5+
To report a violation:
6+
- Public: `#community-charter` category on the Skilluv forum
7+
- Private: `moderation@skilluv.io`
8+
- Emergency: `urgent@skilluv.io`
9+
10+
## Français
11+
12+
Ce projet suit la [Charte communautaire Skilluv](https://github.com/skilluv-community/community-charter/blob/main/community-code-of-conduct.fr.md).

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Contributing to this Skilluv starter
2+
3+
Fork → feature branch → Conventional Commits → PR against `main`. Run `make test` and `make lint`.
4+
5+
Follows the [Skilluv Community Charter](https://github.com/skilluv-community/community-charter).

HELLO.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Bonjour Skilluv
2+
3+
Welcome to your first Skilluv project!
4+
5+
Edit this file by adding a line under `## My introduction` with:
6+
- Your first name or handle
7+
- Your city (optional)
8+
- What you want to learn
9+
10+
Then: commit + push + open a Pull Request from `main` to `showcase`.
11+
12+
Skilluv will automatically detect your PR and unlock your first badge.
13+
14+
---
15+
16+
## Bonjour Skilluv (français)
17+
18+
Bienvenue dans ton premier projet Skilluv !
19+
20+
Modifie ce fichier en ajoutant une ligne sous `## Ma présentation` avec :
21+
- Ton prénom ou pseudo
22+
- Ta ville (facultatif)
23+
- Ce que tu veux apprendre
24+
25+
Ensuite : commit + push + ouvre une Pull Request de `main` vers `showcase`.
26+
27+
Skilluv détectera automatiquement ta PR et débloquera ton premier badge.
28+
29+
---
30+
31+
## My introduction / Ma présentation
32+
33+
<!-- Add your line here / Ajoute ta ligne ici ↓ -->

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Skilluv SAS
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)