mirror of
https://github.com/aykhans/my-self-host-services.git
synced 2025-07-18 10:54:01 +00:00
Compare commits
42 Commits
520f645798
...
main
Author | SHA1 | Date | |
---|---|---|---|
42fe309722 | |||
48d89faaee | |||
![]() |
5ca6236450 | ||
![]() |
cae7ef2ed6 | ||
c28ad9632b | |||
![]() |
3dda03eee0 | ||
![]() |
ea305d6b04 | ||
5e67277ab5 | |||
b3361c697f | |||
e66e518eef | |||
1de5d814db | |||
4feed08d9d | |||
be60210294 | |||
70eb3e0432 | |||
b65a887720 | |||
63f19bcab7 | |||
c67e052225 | |||
a1dbc3053b | |||
502486efb7 | |||
db3998f36e | |||
e607c7a914 | |||
912ca6072d | |||
d8322be853 | |||
9c5d06a7d9 | |||
4f446c9360 | |||
a98e483cf8 | |||
706bbc2ebf | |||
0c6ac285c3 | |||
d9d3a2193e | |||
1ef6b80b6e | |||
18e88f0aba | |||
d886f7b563 | |||
c2053375b1 | |||
f3f9b0494b | |||
13fae7d8fb | |||
1de0cb3d7a | |||
0467abeb28 | |||
a42bd5b5aa | |||
e67e637d0d | |||
0369eb123e | |||
3f9646c62d | |||
e8372b1b42 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +1,4 @@
|
||||
/private
|
||||
.env
|
||||
/private_volume/*
|
||||
!.gitkeep
|
||||
|
@@ -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`
|
||||
|
||||
|
@@ -8,7 +8,7 @@ networks:
|
||||
|
||||
services:
|
||||
blinko-website:
|
||||
image: blinkospace/blinko:0.52.3
|
||||
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
|
||||
|
@@ -35,5 +35,8 @@ SFTPGO_DOMAIN=
|
||||
GLANCE_DOMAIN=
|
||||
GLANCE_CRT=
|
||||
GLANCE_KEY=
|
||||
GLANCE_USERNAME=
|
||||
GLANCE_PASSWORD=
|
||||
|
||||
############# Ghost #############
|
||||
GHOST_DOMAIN=
|
||||
GHOST_CRT=
|
||||
GHOST_KEY=
|
||||
|
@@ -123,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
|
||||
}
|
||||
@@ -139,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
|
||||
|
@@ -6,7 +6,7 @@ networks:
|
||||
|
||||
services:
|
||||
caddy:
|
||||
image: caddy:2.9.1
|
||||
image: caddy:2.10.0-alpine
|
||||
container_name: caddy
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
@@ -21,5 +21,6 @@ services:
|
||||
- ./ssl:/etc/ssl/custom/
|
||||
- ./data/data:/data
|
||||
- ./data/config:/config
|
||||
- ../private_volume:/private_volume
|
||||
env_file:
|
||||
- ./.env
|
||||
|
7
ghost/.env.example
Normal file
7
ghost/.env.example
Normal 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
2
ghost/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/data/*
|
||||
!.gitkeep
|
0
ghost/data/.gitkeep
Normal file
0
ghost/data/.gitkeep
Normal file
31
ghost/docker-compose.yml
Normal file
31
ghost/docker-compose.yml
Normal 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
|
@@ -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
|
||||
|
@@ -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
BIN
glance/assets/ghost.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 44 KiB |
@@ -1,16 +1,46 @@
|
||||
server:
|
||||
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
|
||||
|
||||
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
|
||||
|
@@ -1,6 +1,4 @@
|
||||
- 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:
|
||||
@@ -34,6 +32,9 @@
|
||||
- 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
|
||||
@@ -57,9 +58,14 @@
|
||||
- pocketbase/pocketbase
|
||||
- prometheus/prometheus
|
||||
- grafana/grafana
|
||||
- TryGhost/Ghost
|
||||
|
||||
- size: full
|
||||
widgets:
|
||||
- type: to-do
|
||||
title: To-Do
|
||||
id: general
|
||||
|
||||
- type: group
|
||||
widgets:
|
||||
- type: hacker-news
|
||||
@@ -76,69 +82,6 @@
|
||||
- url: https://selfh.st/rss/
|
||||
title: selfh.st
|
||||
|
||||
- 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" }}"
|
||||
/>
|
||||
|
||||
<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
|
||||
|
@@ -8,7 +8,7 @@ networks:
|
||||
|
||||
services:
|
||||
glance:
|
||||
image: glanceapp/glance:v0.7.12
|
||||
image: glanceapp/glance:v0.8.4
|
||||
container_name: glance
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
|
@@ -10,8 +10,9 @@ networks:
|
||||
|
||||
services:
|
||||
grafana:
|
||||
image: grafana/grafana-enterprise:11.6.0
|
||||
image: grafana/grafana-enterprise:12.0.2
|
||||
container_name: grafana
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- grafana
|
||||
- caddy
|
||||
|
20
main.sh
20
main.sh
@@ -61,6 +61,7 @@ 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
|
||||
@@ -71,6 +72,7 @@ generate_env_files() {
|
||||
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
|
||||
@@ -162,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
|
||||
@@ -263,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
0
private_volume/.gitkeep
Normal file
@@ -12,8 +12,9 @@ networks:
|
||||
|
||||
services:
|
||||
prometheus:
|
||||
image: prom/prometheus:v3.2.1
|
||||
image: prom/prometheus:v3.5.0
|
||||
container_name: prometheus
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- prometheus
|
||||
- grafana
|
||||
@@ -26,6 +27,7 @@ services:
|
||||
node_exporter:
|
||||
image: quay.io/prometheus/node-exporter:v1.9.1
|
||||
container_name: node_exporter
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- prometheus
|
||||
command:
|
||||
@@ -37,6 +39,7 @@ services:
|
||||
cadvisor:
|
||||
image: gcr.io/cadvisor/cadvisor:v0.49.1
|
||||
container_name: cadvisor
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- prometheus
|
||||
volumes:
|
||||
|
@@ -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:
|
||||
|
@@ -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=
|
@@ -1,49 +1,19 @@
|
||||
# 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}
|
||||
|
||||
# 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
|
||||
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
|
||||
networks:
|
||||
- caddy
|
||||
- /lib/modules:/lib/modules:ro
|
||||
ports:
|
||||
- "51820:51820/udp"
|
||||
# - "51821:51821/tcp"
|
||||
@@ -51,7 +21,23 @@ services:
|
||||
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
|
||||
- net.ipv6.conf.all.disable_ipv6=0
|
||||
- net.ipv6.conf.all.forwarding=1
|
||||
- net.ipv6.conf.default.forwarding=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
|
||||
|
Reference in New Issue
Block a user