Compare commits

...

54 Commits

Author SHA1 Message Date
42fe309722 bump gitea to v1.24.3 2025-07-16 06:54:42 +00:00
48d89faaee bump prometheus to 3.5.0 2025-07-16 06:53:24 +00:00
Aykhan Shahsuvarov
5ca6236450 wg_easy: add interface name to networks 2025-07-05 11:41:50 +00:00
Aykhan Shahsuvarov
cae7ef2ed6 increase gitea memory limit 2025-07-05 10:13:05 +00:00
c28ad9632b Add restart policy 2025-07-02 14:01:40 +04:00
Aykhan Shahsuvarov
3dda03eee0 add gitea network to main.sh 2025-07-01 21:06:01 +00:00
Aykhan Shahsuvarov
ea305d6b04 bump blinko to v1.1.2 2025-07-01 20:19:31 +00:00
5e67277ab5 bump gitea to 1.24.2 2025-06-21 18:27:55 +00:00
b3361c697f bump gitea to 1.24.1 2025-06-21 10:12:35 +00:00
e66e518eef bump grafana to 12.0.2 2025-06-21 10:11:51 +00:00
1de5d814db bump blinko to 1.1.1 2025-06-17 15:24:06 +00:00
4feed08d9d bump blinko to 1.1.0 2025-06-11 20:53:20 +00:00
be60210294 bump prometheus to 3.4.1 2025-06-11 17:53:39 +00:00
70eb3e0432 bump glance to v0.8.4 2025-06-11 17:50:43 +00:00
b65a887720 bump gitea to 1.24.0 2025-06-11 17:49:36 +00:00
63f19bcab7 update glance home page 2025-06-08 17:50:34 +00:00
c67e052225 update gitea compose file 2025-06-07 14:39:50 +00:00
a1dbc3053b bump blinko to 1.0.7 2025-06-06 11:25:37 +00:00
502486efb7 bump blinko to 1.0.4 2025-05-30 00:57:40 +00:00
db3998f36e bump blinko to 1.0.3 2025-05-29 13:22:11 +00:00
e607c7a914 bump wg easy to 15 2025-05-28 17:32:13 +00:00
912ca6072d bump vaultwarden to 1.34.1 2025-05-27 00:59:27 +00:00
d8322be853 bump grafana to 12.0.1 2025-05-24 12:27:30 +00:00
9c5d06a7d9 bump prometheus to 3.4.0 2025-05-20 20:24:18 +00:00
4f446c9360 bump glance to v0.8.3 2025-05-20 20:10:27 +00:00
a98e483cf8 bump glance to 0.8.2 2025-05-14 21:47:49 +00:00
706bbc2ebf glance: add to-do widget 2025-05-14 23:46:22 +04:00
0c6ac285c3 bump gitea to 1.23.8 2025-05-14 19:43:38 +00:00
d9d3a2193e glance: update themes 2025-05-14 19:43:00 +00:00
1ef6b80b6e bump glance to v0.8.0 and add admin user 2025-05-14 23:34:55 +04:00
18e88f0aba remove glance basic auth 2025-05-14 23:28:27 +04:00
d886f7b563 add 'private_volume' 2025-05-13 16:31:52 +04:00
c2053375b1 bump grafan to 12.0.0 2025-05-05 19:02:10 +00:00
f3f9b0494b bump prometheus v3.3.1 2025-05-03 15:56:48 +00:00
13fae7d8fb bump caddy to 2.10.0-alpine 2025-05-03 15:51:00 +00:00
1de0cb3d7a Update glance home page 2025-04-28 04:45:42 +04:00
0467abeb28 Update compose and env files 2025-04-27 22:35:22 +00:00
a42bd5b5aa Update ghost compose file 2025-04-28 01:49:21 +04:00
e67e637d0d Add ghost 2025-04-28 01:42:12 +04:00
0369eb123e bump grafana to 11.6.1 2025-04-26 12:29:58 +00:00
3f9646c62d bump glance to 0.7.13 2025-04-23 12:25:27 +00:00
e8372b1b42 bump prometheus to 3.3.0 2025-04-19 19:02:57 +00:00
520f645798 update glance home page 2025-04-16 11:57:47 +00:00
bb77431fd1 bump glance to 0.7.12 2025-04-16 11:56:34 +00:00
51fc175a54 bump blinko to 0.52.3 2025-04-16 11:55:36 +00:00
a6932ac724 Update compose file 2025-04-12 11:27:14 +00:00
da397a0ca2 Update compose file 2025-04-11 19:38:28 +00:00
87a4c1fad9 Fix compose file 2025-04-11 01:08:37 +04:00
e9eddf15e3 Fix compose file 2025-04-11 01:05:55 +04:00
b39f777252 Add grafana and prometheus services 2025-04-11 00:52:30 +04:00
36f3ae7d59 Add grafana to Caddyfile and .env.example 2025-04-11 00:49:59 +04:00
f89c69d17b Add grafana 2025-04-11 00:49:31 +04:00
98faa391f0 Add prometheus 2025-04-11 00:41:27 +04:00
d2789c07aa Update compose file 2025-04-11 00:40:33 +04:00
30 changed files with 27028 additions and 250 deletions

4
.gitignore vendored
View File

@@ -1,2 +1,4 @@
/private
.env
.env
/private_volume/*
!.gitkeep

View File

@@ -27,6 +27,7 @@ Edit the generated `.env` files to fill in the required fields:
- `./vaultwarden/.env`
- `./wg_easy/.env`
- `./blinko/.env`
- `./ghost/.env`
- `./caddy/.env`
- `./caddy/Caddyfile.private`

View File

@@ -8,7 +8,7 @@ networks:
services:
blinko-website:
image: blinkospace/blinko:0.50.0
image: blinkospace/blinko:1.1.2
container_name: blinko-website
environment:
NODE_ENV: production
@@ -24,12 +24,6 @@ services:
options:
max-size: "10m"
max-file: "3"
healthcheck:
test: ["CMD", "curl", "-f", "http://blinko-website:1111/"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
networks:
- blinko
- caddy

View File

@@ -1,3 +1,8 @@
############# Grafana #############
GRAFANA_DOMAIN=
GRAFANA_CRT=
GRAFANA_KEY=
############# Gitea #############
GITEA_DOMAIN=
GITEA_CRT=
@@ -30,5 +35,8 @@ SFTPGO_DOMAIN=
GLANCE_DOMAIN=
GLANCE_CRT=
GLANCE_KEY=
GLANCE_USERNAME=
GLANCE_PASSWORD=
############# Ghost #############
GHOST_DOMAIN=
GHOST_CRT=
GHOST_KEY=

View File

@@ -1,5 +1,28 @@
{
admin off
metrics {
per_host
}
}
:2019 {
metrics
}
############## grafana ##############
{$GRAFANA_DOMAIN} {
tls /etc/ssl/custom/{$GRAFANA_CRT} /etc/ssl/custom/{$GRAFANA_KEY}
request_body {
max_size 2048MB
}
reverse_proxy http://grafana:3000 {
header_up X-Real-IP {http.request.header.Cf-Connecting-Ip}
header_up X-Forwarded-For {http.request.header.Cf-Connecting-Ip}
header_up X-Country-Code {http.request.header.Cf-Ipcountry}
header_up -CF-*
}
}
############## gitea ##############
@@ -100,10 +123,6 @@
{$GLANCE_DOMAIN} {
tls /etc/ssl/custom/{$GLANCE_CRT} /etc/ssl/custom/{$GLANCE_KEY}
basic_auth {
{$GLANCE_USERNAME} {$GLANCE_PASSWORD}
}
request_body {
max_size 64MB
}
@@ -116,6 +135,24 @@
}
}
############## ghost ##############
{$GHOST_DOMAIN} {
tls /etc/ssl/custom/{$GHOST_CRT} /etc/ssl/custom/{$GHOST_KEY}
request_body {
max_size 124MB
}
reverse_proxy http://ghost:2368 {
header_up X-Real-IP {http.request.header.Cf-Connecting-Ip}
header_up X-Forwarded-For {http.request.header.Cf-Connecting-Ip}
header_up X-Country-Code {http.request.header.Cf-Ipcountry}
header_up X-Forwarded-Proto {http.request.scheme}
header_up Host {http.request.host}
header_up -CF-*
}
}
import Caddyfile.private

View File

@@ -1,6 +1,12 @@
networks:
caddy:
name: caddy
driver: bridge
external: true
services:
caddy:
image: caddy:2.9.1
image: caddy:2.10.0-alpine
container_name: caddy
restart: unless-stopped
networks:
@@ -15,11 +21,6 @@ services:
- ./ssl:/etc/ssl/custom/
- ./data/data:/data
- ./data/config:/config
- ../private_volume:/private_volume
env_file:
- ./.env
networks:
caddy:
name: caddy
driver: bridge
external: true

7
ghost/.env.example Normal file
View File

@@ -0,0 +1,7 @@
URL=
MAIL_HOST=
MAIL_PORT=465
MAIL_SECURE=true
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_FROM=

2
ghost/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/data/*
!.gitkeep

0
ghost/data/.gitkeep Normal file
View File

31
ghost/docker-compose.yml Normal file
View File

@@ -0,0 +1,31 @@
networks:
caddy:
name: caddy
driver: bridge
external: true
services:
ghost:
image: ghost:5-alpine
container_name: ghost
restart: unless-stopped
networks:
- caddy
environment:
# DB
database__client: sqlite3
database__connection__filename: content/data/ghost.db
# App
NODE_ENV: production
url: ${URL}
# Mail
mail__options__host: ${MAIL_HOST}
mail__options__port: ${MAIL_PORT}
mail__options__secure: ${MAIL_SECURE}
mail__options__auth__user: ${MAIL_USERNAME}
mail__options__auth__pass: ${MAIL_PASSWORD}
mail__from: ${MAIL_FROM}
mail__options__service: SMTP
mail__transport: SMTP
volumes:
- ./data:/var/lib/ghost/content

View File

@@ -8,7 +8,7 @@ networks:
services:
server:
image: gitea/gitea:1.23.7
image: gitea/gitea:1.24.3
container_name: gitea
environment:
- USER_UID=${USER_UID}
@@ -21,7 +21,10 @@ services:
- ./data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
mem_limit: 512m
deploy:
resources:
limits:
memory: 1G
act:
image: gitea/act_runner:0.2.11

View File

@@ -1,5 +1,3 @@
# Variables defined here will be available to use anywhere in the config with the syntax ${MY_SECRET_TOKEN}
# Note: making changes to this file requires re-running docker compose up
MY_SECRET_TOKEN=
GITHUB_TOKEN=
SERADAR_TOKEN=
SECRET_KEY=
ADMIN_PASSWORD=

BIN
glance/assets/ghost.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -1,16 +1,46 @@
server:
assets-path: /app/assets
assets-path: /app/assets
auth:
secret-key: ${SECRET_KEY}
users:
admin:
password: ${ADMIN_PASSWORD}
theme:
# Note: assets are cached by the browser, changes to the CSS file
# will not be reflected until the browser cache is cleared (Ctrl+F5)
custom-css-file: /assets/user.css
background-color: 240 13 14
primary-color: 51 33 68
negative-color: 358 100 68
contrast-multiplier: 1.2
background-color: 240 13 14
primary-color: 51 33 68
negative-color: 358 100 68
contrast-multiplier: 1.2
presets:
neon-focus:
background-color: 255 14 6
primary-color: 156 50 65
negative-color: 342 65 65
contrast-multiplier: 0.9
text-saturation-multiplier: 0.8
gruvbox-dark:
background-color: 0 0 16
primary-color: 43 59 81
positive-color: 61 66 44
negative-color: 6 96 59
catppuccin-macchiato:
background-color: 232 23 18
contrast-multiplier: 1.2
primary-color: 220 83 75
positive-color: 105 48 72
negative-color: 351 74 73
peachy:
light: true
background-color: 28 40 77
primary-color: 155 100 20
negative-color: 0 100 60
contrast-multiplier: 1.1
text-saturation-multiplier: 0.5
pages:
# It's not necessary to create a new file for each page and include it, you can simply
# put its contents here, though multiple pages are easier to manage when separated
!include: home.yml
$include: home.yml

View File

@@ -1,159 +1,104 @@
- name: Home
# Optionally, if you only have a single page you can hide the desktop navigation for a cleaner look
# hide-desktop-navigation: true
columns:
- size: small
widgets:
- type: server-stats
servers:
- type: local
name: Services
- size: small
widgets:
- type: server-stats
servers:
- type: local
name: Services
- type: monitor
cache: 1s
title: Services
sites:
- title: seradar.net
url: https://seradar.net/auth
icon: /assets/seradar.png
- title: git.aykhans.me
url: https://git.aykhans.me/aykhans
icon: /assets/gitea.svg
- title: ftp.aykhans.me
url: https://ftp.aykhans.me/web/client/login
icon: /assets/sftpgo.png
- title: notes.aykhans.me
url: https://notes.aykhans.me/signin
icon: /assets/blinko.png
- title: url.aykhans.me
url: https://url.aykhans.me/auth
icon: /assets/slash.svg
- title: vault.aykhans.me
url: https://vault.aykhans.me/#/login
icon: /assets/vaultwarden.svg
- title: wg.aykhans.me
url: https://wg.aykhans.me/
icon: /assets/wireguard.png
- type: monitor
cache: 1s
title: Services
sites:
- title: seradar.net
url: https://seradar.net/auth
icon: /assets/seradar.png
- title: git.aykhans.me
url: https://git.aykhans.me/aykhans
icon: /assets/gitea.svg
- title: ftp.aykhans.me
url: https://ftp.aykhans.me/web/client/login
icon: /assets/sftpgo.png
- title: notes.aykhans.me
url: https://notes.aykhans.me/signin
icon: /assets/blinko.png
- title: url.aykhans.me
url: https://url.aykhans.me/auth
icon: /assets/slash.svg
- title: vault.aykhans.me
url: https://vault.aykhans.me/#/login
icon: /assets/vaultwarden.svg
- title: wg.aykhans.me
url: https://wg.aykhans.me/
icon: /assets/wireguard.png
- title: aykhans.me
url: https://aykhans.me/
icon: /assets/ghost.png
- type: docker-containers
cache: 0s
hide-by-default: false
- type: docker-containers
cache: 0s
hide-by-default: false
- type: releases
cache: 1d
collapse-after: 3
# Without authentication the Github API allows for up to 60 requests per hour. You can create a
# read-only token from your Github account settings and use it here to increase the limit.
token: ${GITHUB_TOKEN}
repositories:
- caddyserver/caddy
- glanceapp/glance
- go-gitea/gitea
- drakkan/sftpgo
- blinko-space/blinko
- yourselfhosted/slash
- dani-garcia/vaultwarden
- wg-easy/wg-easy
- pocketbase/pocketbase
- type: releases
cache: 1d
collapse-after: 3
# Without authentication the Github API allows for up to 60 requests per hour. You can create a
# read-only token from your Github account settings and use it here to increase the limit.
token: ${GITHUB_TOKEN}
repositories:
- caddyserver/caddy
- glanceapp/glance
- go-gitea/gitea
- drakkan/sftpgo
- blinko-space/blinko
- yourselfhosted/slash
- dani-garcia/vaultwarden
- wg-easy/wg-easy
- pocketbase/pocketbase
- prometheus/prometheus
- grafana/grafana
- TryGhost/Ghost
- size: full
widgets:
- type: group
widgets:
- type: hacker-news
- type: lobsters
- size: full
widgets:
- type: to-do
title: To-Do
id: general
- type: rss
limit: 150
collapse-after: 5
cache: 1h
style: horizontal-cards
feeds:
- url: https://registerspill.thorstenball.com/feed
title: Thorsten Ball
- url: https://selfh.st/rss/
title: selfh.st
- type: group
widgets:
- type: hacker-news
- type: lobsters
- type: custom-api
title: Seradar
cache: 1m
url: https://seradar.net/api/collections/series/records?page=1&perPage=1000&sort=-new_episodes
headers:
Accept: application/json
Authorization: ${SERADAR_TOKEN}
template: |
{{ if eq .Response.StatusCode 200 }}
<div class="widget widget-type-rss">
<div
class="widget-content widget-content-frameless"
>
<div
class="carousel-container show-right-cutoff"
>
<div
class="cards-horizontal carousel-items-container"
>
{{ range .JSON.Array "items" }}
<a
href="https://www.themoviedb.org/tv/{{ .String "series_id" }}"
target="_blank"
rel="noreferrer"
title="{{ .String "english_name" }}"
>
<div
class="card rss-card-2 widget-content-frame thumbnail-parent"
>
<img
class="rss-card-2-image thumbnail cached finished-transition"
loading="lazy"
src="{{ .String "poster_path" }}"
alt="{{ .String "poster_path" }}"
/>
- type: rss
limit: 150
collapse-after: 5
cache: 1h
style: horizontal-cards
feeds:
- url: https://registerspill.thorstenball.com/feed
title: Thorsten Ball
- url: https://selfh.st/rss/
title: selfh.st
<div
class="rss-card-2-content padding-inline-widget"
>
<a
href="https://www.themoviedb.org/tv/{{ .String "series_id" }}"
class="text-truncate-3-lines color-positive margin-top-10 size-h4"
target="_blank"
rel="noreferrer"
title="{{ .String "english_name" }}"
>{{ .String "english_name" }}</a>
{{ if gt (.Int "new_episodes") 0 }}
<p class="color-highlight">+{{ .Int "new_episodes" }} new episodes</p>
{{ else }}
<p>no new episodes</p>
{{ end }}
</div>
</div>
</a>
{{ end }}
</div>
</div>
</div>
</div>
{{ else }}
<p class="color-negative">Failed to fetch seradar.net data</p>
{{ end }}
- size: small
widgets:
- type: calendar
first-day-of-week: monday
- size: small
widgets:
- type: calendar
first-day-of-week: monday
- type: weather
location: Baku, Azerbaijan
units: metric # alternatively "imperial"
hour-format: 12h # alternatively "24h"
- type: weather
location: Baku, Azerbaijan
units: metric # alternatively "imperial"
hour-format: 12h # alternatively "24h"
- type: markets
markets:
- symbol: BTC-USD
name: Bitcoin
- symbol: DYDX-USD
name: DYDX
- symbol: FET-USD
name: FET
- symbol: SUI20947-USD
name: SUI
- type: markets
markets:
- symbol: BTC-USD
name: Bitcoin
- symbol: DYDX-USD
name: DYDX
- symbol: FET-USD
name: FET
- symbol: SUI20947-USD
name: SUI

View File

@@ -8,7 +8,7 @@ networks:
services:
glance:
image: glanceapp/glance:v0.7.8
image: glanceapp/glance:v0.8.4
container_name: glance
restart: unless-stopped
networks:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,774 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"description": "Simple exporter for cadvisor only",
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 4,
"links": [],
"panels": [
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 8,
"panels": [],
"title": "CPU",
"type": "row"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheusdatasource"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 1
},
"id": 15,
"options": {
"alertThreshold": true,
"legend": {
"calcs": [
"mean",
"max"
],
"displayMode": "table",
"placement": "right",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "11.6.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheusdatasource"
},
"expr": "sum(rate(container_cpu_usage_seconds_total{instance=~\"$host\",name=~\"$container\",name=~\".+\"}[5m])) by (name) *100",
"hide": false,
"interval": "",
"legendFormat": "{{name}}",
"refId": "A"
}
],
"title": "CPU Usage",
"type": "timeseries"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 8
},
"id": 11,
"panels": [],
"title": "Memory",
"type": "row"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheusdatasource"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 9
},
"id": 9,
"options": {
"alertThreshold": true,
"legend": {
"calcs": [
"mean",
"max"
],
"displayMode": "table",
"placement": "right",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "11.6.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheusdatasource"
},
"expr": "sum(container_memory_rss{instance=~\"$host\",name=~\"$container\",name=~\".+\"}) by (name)",
"hide": false,
"interval": "",
"legendFormat": "{{name}}",
"refId": "A"
}
],
"title": "Memory Usage",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheusdatasource"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 9
},
"id": 14,
"options": {
"alertThreshold": true,
"legend": {
"calcs": [
"mean",
"max"
],
"displayMode": "table",
"placement": "right",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "11.6.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheusdatasource"
},
"expr": "sum(container_memory_cache{instance=~\"$host\",name=~\"$container\",name=~\".+\"}) by (name)",
"hide": false,
"interval": "",
"legendFormat": "{{name}}",
"refId": "A"
}
],
"title": "Memory Cached",
"type": "timeseries"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 17
},
"id": 2,
"panels": [],
"title": "Network",
"type": "row"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheusdatasource"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "Bps"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 18
},
"id": 4,
"options": {
"alertThreshold": true,
"legend": {
"calcs": [
"mean",
"max"
],
"displayMode": "table",
"placement": "right",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "11.6.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheusdatasource"
},
"expr": "sum(rate(container_network_receive_bytes_total{instance=~\"$host\",name=~\"$container\",name=~\".+\"}[5m])) by (name)",
"hide": false,
"interval": "",
"legendFormat": "{{name}}",
"refId": "A"
}
],
"title": "Received Network Traffic",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheusdatasource"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "Bps"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 18
},
"id": 6,
"options": {
"alertThreshold": true,
"legend": {
"calcs": [
"mean",
"max"
],
"displayMode": "table",
"placement": "right",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "11.6.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheusdatasource"
},
"expr": "sum(rate(container_network_transmit_bytes_total{instance=~\"$host\",name=~\"$container\",name=~\".+\"}[5m])) by (name)",
"interval": "",
"legendFormat": "{{name}}",
"refId": "A"
}
],
"title": "Sent Network Traffic",
"type": "timeseries"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 26
},
"id": 19,
"panels": [],
"title": "Misc",
"type": "row"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheusdatasource"
},
"fieldConfig": {
"defaults": {
"custom": {
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "id"
},
"properties": [
{
"id": "custom.width",
"value": 260
}
]
},
{
"matcher": {
"id": "byName",
"options": "Running"
},
"properties": [
{
"id": "unit",
"value": "d"
},
{
"id": "decimals",
"value": 1
},
{
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
},
{
"id": "color",
"value": {
"fixedColor": "dark-green",
"mode": "fixed"
}
}
]
}
]
},
"gridPos": {
"h": 10,
"w": 24,
"x": 0,
"y": 27
},
"id": 17,
"options": {
"showHeader": true,
"sortBy": []
},
"pluginVersion": "7.4.5",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheusdatasource"
},
"expr": "(time() - container_start_time_seconds{instance=~\"$host\",name=~\"$container\",name=~\".+\"})/86400",
"format": "table",
"instant": true,
"interval": "",
"legendFormat": "{{name}}",
"refId": "A"
}
],
"title": "Containers Info",
"transformations": [
{
"id": "filterFieldsByName",
"options": {
"include": {
"names": [
"container_label_com_docker_compose_project",
"container_label_com_docker_compose_project_working_dir",
"image",
"instance",
"name",
"Value",
"container_label_com_docker_compose_service"
]
}
}
},
{
"id": "organize",
"options": {
"excludeByName": {},
"indexByName": {},
"renameByName": {
"Value": "Running",
"container_label_com_docker_compose_project": "Label",
"container_label_com_docker_compose_project_working_dir": "Working dir",
"container_label_com_docker_compose_service": "Service",
"image": "Registry Image",
"instance": "Instance",
"name": "Name"
}
}
}
],
"type": "table"
}
],
"preload": false,
"refresh": "",
"schemaVersion": 41,
"tags": [
"cadvisor",
"docker"
],
"templating": {
"list": [
{
"allValue": ".*",
"current": {
"text": "All",
"value": "$__all"
},
"datasource": "prometheusdatasource",
"definition": "label_values({__name__=~\"container.*\"},instance)",
"includeAll": true,
"label": "Host",
"name": "host",
"options": [],
"query": {
"query": "label_values({__name__=~\"container.*\"},instance)",
"refId": "Prometheus-host-Variable-Query"
},
"refresh": 1,
"regex": "",
"sort": 5,
"type": "query"
},
{
"allValue": ".*",
"current": {
"text": "All",
"value": "$__all"
},
"datasource": "prometheusdatasource",
"definition": "label_values({__name__=~\"container.*\", instance=~\"$host\"},name)",
"includeAll": true,
"label": "Container",
"name": "container",
"options": [],
"query": {
"query": "label_values({__name__=~\"container.*\", instance=~\"$host\"},name)",
"refId": "Prometheus-container-Variable-Query"
},
"refresh": 1,
"regex": "",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Cadvisor exporter",
"uid": "pMEd7m0Mz",
"version": 1
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,27 @@
apiVersion: 1
providers:
# Unique name for the provider
- name: 'general'
# Organization ID. 1 usually corresponds to the default 'Main Org.'
orgId: 1
# Optional: Assign dashboards to a specific folder in Grafana UI
folder: ''
# Provider type: 'file' means loading from filesystem
type: file
# Optional: Prevents deletion of dashboards from Grafana UI
# (they will reappear on restart if deleted)
disableDeletion: false
# Optional: Allow users to edit dashboards in the Grafana UI.
# Changes will be overwritten on restart unless you save them elsewhere.
editable: true
updateIntervalSeconds: 10
allowUiUpdates: true
# Options specific to the 'file' type provider
options:
# Path inside the container where Grafana should look for dashboard JSON files.
# This MUST match the target path of your dashboard JSON volume mount below.
path: /var/lib/grafana/dashboards
# Optional: Set to true to automatically update dashboards based on file changes
# without restarting Grafana (requires polling).
# updateIntervalSeconds: 10

View File

@@ -0,0 +1,9 @@
apiVersion: 1
datasources:
- name: Prometheus
uid: prometheusdatasource
type: prometheus
access: proxy
url: http://prometheus:9090
isDefault: true

View File

@@ -0,0 +1,26 @@
networks:
grafana:
name: grafana
driver: bridge
external: true
caddy:
name: caddy
driver: bridge
external: true
services:
grafana:
image: grafana/grafana-enterprise:12.0.2
container_name: grafana
restart: unless-stopped
networks:
- grafana
- caddy
volumes:
- grafana-data:/var/lib/grafana
- ./data/grafana/dashboards:/var/lib/grafana/dashboards
- ./data/provisioning/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml
- ./data/provisioning/datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml
volumes:
grafana-data:

77
main.sh
View File

@@ -61,13 +61,45 @@ generate_env_files() {
cp --update=none ./caddy/.env.example ./caddy/.env
cp --update=none ./glance/.env.example ./glance/.env
cp --update=none ./blinko/.env.example ./blinko/.env
cp --update=none ./ghost/.env.example ./ghost/.env
cp --update=none ./caddy/Caddyfile.private.example ./caddy/Caddyfile.private
# cp --update=none ./slash/.env.example ./slash/.env
# cp --update=none ./grafana/.env.example ./grafana/.env
# cp --update=none ./prometheus/.env.example ./prometheus/.env
print_success ".env files generated."
}
start_services() {
docker network create caddy 2>/dev/null
docker network create grafana 2>/dev/null
docker network create gitea 2>/dev/null
echo "Starting prometheus..."
$DOCKER_COMPOSE_COMMAND -f ./prometheus/docker-compose.yml up -d
if [ $? -eq 0 ]; then
print_success "Prometheus started successfully."
else
print_error "failed to start Prometheus!"
exit 1
fi
echo "Starting Grafana..."
$DOCKER_COMPOSE_COMMAND -f ./grafana/docker-compose.yml up -d
if [ $? -eq 0 ]; then
print_success "Grafana started successfully."
else
print_error "failed to start Grafana!"
exit 1
fi
echo "Starting Gitea..."
$DOCKER_COMPOSE_COMMAND -f ./gitea/docker-compose.yml up -d
if [ $? -eq 0 ]; then
print_success "Gitea started successfully."
else
print_error "failed to start Gitea!"
exit 1
fi
echo "Starting gitea..."
$DOCKER_COMPOSE_COMMAND -f ./gitea/docker-compose.yml up -d
@@ -132,6 +164,15 @@ start_services() {
exit 1
fi
echo "Starting ghost..."
$DOCKER_COMPOSE_COMMAND -f ./ghost/docker-compose.yml up -d
if [ $? -eq 0 ]; then
print_success "Ghost started successfully."
else
print_error "failed to start Ghost!"
exit 1
fi
echo "Starting caddy..."
$DOCKER_COMPOSE_COMMAND -f ./caddy/docker-compose.yml up -d
if [ $? -eq 0 ]; then
@@ -143,6 +184,33 @@ start_services() {
}
stop_services() {
echo "Stopping grafana..."
$DOCKER_COMPOSE_COMMAND -f ./grafana/docker-compose.yml down
if [ $? -eq 0 ]; then
print_success "Grafana stopped successfully."
else
print_error "failed to stop Grafana!"
exit 1
fi
echo "Stopping prometheus..."
$DOCKER_COMPOSE_COMMAND -f ./prometheus/docker-compose.yml down
if [ $? -eq 0 ]; then
print_success "Prometheus stopped successfully."
else
print_error "failed to stop Prometheus!"
exit 1
fi
echo "Stopping gitea..."
$DOCKER_COMPOSE_COMMAND -f ./gitea/docker-compose.yml down
if [ $? -eq 0 ]; then
print_success "Gitea stopped successfully."
else
print_error "failed to stop Gitea!"
exit 1
fi
echo "Stopping gitea..."
$DOCKER_COMPOSE_COMMAND -f ./gitea/docker-compose.yml down
if [ $? -eq 0 ]; then
@@ -206,6 +274,15 @@ stop_services() {
exit 1
fi
echo "Stopping ghost..."
$DOCKER_COMPOSE_COMMAND -f ./ghost/docker-compose.yml down
if [ $? -eq 0 ]; then
print_success "Ghost stopped successfully."
else
print_error "failed to stop Ghost!"
exit 1
fi
echo "Stopping caddy..."
$DOCKER_COMPOSE_COMMAND -f ./caddy/docker-compose.yml down
if [ $? -eq 0 ]; then

0
private_volume/.gitkeep Normal file
View File

2
prometheus/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/data/*
!/data/config

View File

@@ -0,0 +1,18 @@
global:
scrape_interval: 10s
scrape_configs:
- job_name: "node_exporter"
scrape_interval: 2s
static_configs:
- targets: ["node_exporter:9100"]
- job_name: "cadvisor"
scrape_interval: 2s
static_configs:
- targets: ["cadvisor:8080"]
- job_name: caddy
scrape_interval: 2s
static_configs:
- targets: ["caddy:2019"]

View File

@@ -0,0 +1,58 @@
networks:
prometheus:
external: false
grafana:
name: grafana
driver: bridge
external: true
caddy:
name: caddy
driver: bridge
external: true
services:
prometheus:
image: prom/prometheus:v3.5.0
container_name: prometheus
restart: unless-stopped
networks:
- prometheus
- grafana
- caddy
command: "--config.file=/etc/prometheus/prometheus.yaml --storage.tsdb.retention.time=10d --storage.tsdb.retention.size=5GB"
volumes:
- ./data/config/prometheus.yaml:/etc/prometheus/prometheus.yaml:ro
- prometheus-data:/prometheus
node_exporter:
image: quay.io/prometheus/node-exporter:v1.9.1
container_name: node_exporter
restart: unless-stopped
networks:
- prometheus
command:
- "--path.rootfs=/host"
pid: host
volumes:
- "/:/host:ro,rslave"
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.49.1
container_name: cadvisor
restart: unless-stopped
networks:
- prometheus
volumes:
- "/:/rootfs:ro"
- "/var/run:/var/run:ro"
- "/sys:/sys:ro"
- "/var/lib/docker/:/var/lib/docker:ro"
- "/dev/disk/:/dev/disk:ro"
privileged: true
devices:
- "/dev/kmsg:/dev/kmsg"
command:
- --disable_metrics=advtcp,cpu_topology,cpuset,hugetlb,memory_numa,process,referenced_memory,resctrl,sched,tcp,udp,percpu,disk,diskIO,oom_event,perf_event
volumes:
prometheus-data:

View File

@@ -6,7 +6,7 @@ networks:
services:
server:
image: vaultwarden/server:1.33.2
image: vaultwarden/server:1.34.1
container_name: vaultwarden
restart: unless-stopped
environment:

View File

@@ -1,7 +0,0 @@
# Language of web page (e.g. en)
LANG=
# The public hostname or IP of your VPN server (e.g. vpn.example.com, 1.1.1.1)
WG_HOST=
# (Optional) When set, requires a password when logging in to the Web UI.
# See How to generate a hash: https://github.com/wg-easy/wg-easy/blob/master/How_to_generate_an_bcrypt_hash.md
PASSWORD_HASH=

View File

@@ -1,57 +1,43 @@
# volumes:
# etc_wireguard:
networks:
caddy:
name: caddy
driver: bridge
external: true
services:
wg-easy:
environment:
# Change Language:
# (Supports: en, ua, ru, tr, no, pl, fr, de, ca, es, ko, vi, nl, is, pt, chs, cht, it, th, hi, ja)
- LANG=${LANG:-en}
# ⚠️ Required:
# Change this to your host's public address
- WG_HOST=${WG_HOST}
wg-easy:
image: ghcr.io/wg-easy/wg-easy:15
container_name: wg-easy
networks:
caddy:
interface_name: wgeth1
wg:
ipv4_address: 10.42.42.42
ipv6_address: fdcc:ad94:bacf:61a3::2a
interface_name: wgeth0
environment:
WG_DEVICE: wgeth0
volumes:
- ./data:/etc/wireguard
- /lib/modules:/lib/modules:ro
ports:
- "51820:51820/udp"
# - "51821:51821/tcp"
restart: unless-stopped
cap_add:
- NET_ADMIN
- SYS_MODULE
sysctls:
- net.ipv4.ip_forward=1
- net.ipv4.conf.all.src_valid_mark=1
- net.ipv6.conf.all.disable_ipv6=0
- net.ipv6.conf.all.forwarding=1
- net.ipv6.conf.default.forwarding=1
# Optional:
- PASSWORD_HASH=${PASSWORD_HASH}
# - PORT=51821
# - WG_PORT=51820
# - WG_CONFIG_PORT=92820
# - WG_DEFAULT_ADDRESS=10.8.0.x
# - WG_DEFAULT_DNS=1.1.1.1
# - WG_MTU=1420
# - WG_ALLOWED_IPS=192.168.15.0/24, 10.0.1.0/24
# - WG_PERSISTENT_KEEPALIVE=25
# - WG_PRE_UP=echo "Pre Up" > /etc/wireguard/pre-up.txt
# - WG_POST_UP=echo "Post Up" > /etc/wireguard/post-up.txt
# - WG_PRE_DOWN=echo "Pre Down" > /etc/wireguard/pre-down.txt
# - WG_POST_DOWN=echo "Post Down" > /etc/wireguard/post-down.txt
# - UI_TRAFFIC_STATS=true
# - UI_CHART_TYPE=0 # (0 Charts disabled, 1 # Line chart, 2 # Area chart, 3 # Bar chart)
# - WG_ENABLE_ONE_TIME_LINKS=true
# - UI_ENABLE_SORT_CLIENTS=true
# - WG_ENABLE_EXPIRES_TIME=true
# - ENABLE_PROMETHEUS_METRICS=false
# - PROMETHEUS_METRICS_PASSWORD=$$2a$$12$$vkvKpeEAHD78gasyawIod.1leBMKg8sBwKW.pQyNsq78bXV3INf2G # (needs double $$, hash of 'prometheus_password'; see "How_to_generate_an_bcrypt_hash.md" for generate the hash)
image: ghcr.io/wg-easy/wg-easy:14
container_name: wg-easy
volumes:
- ./data:/etc/wireguard
networks:
- caddy
ports:
- "51820:51820/udp"
# - "51821:51821/tcp"
restart: unless-stopped
cap_add:
- NET_ADMIN
- SYS_MODULE
# - NET_RAW # ⚠️ Uncomment if using Podman
sysctls:
- net.ipv4.ip_forward=1
- net.ipv4.conf.all.src_valid_mark=1
networks:
caddy:
name: caddy
driver: bridge
external: true
wg:
driver: bridge
enable_ipv6: true
ipam:
driver: default
config:
- subnet: 10.42.42.0/24
- subnet: fdcc:ad94:bacf:61a3::/64