Compare commits

..

37 commits

Author SHA1 Message Date
96024edac5 Store Jellyfin domain in secrets 2024-11-26 16:01:38 +01:00
aaf11e0c1d Allow specifying overrides for docker services 2024-11-26 15:47:38 +01:00
6d18b563fc Allow specifying additional patterns to back up 2024-11-26 15:44:49 +01:00
b164c3f93b Configure forgejo runner by default 2024-11-26 15:42:18 +01:00
b150e2aa9a Store all forgejo files in data/ 2024-11-26 15:42:07 +01:00
cfe061a159 Set forgejo domain by default 2024-11-26 15:41:51 +01:00
9246e7d9e8 Reduce redundancy of drone setup 2024-11-26 14:54:52 +01:00
cdbc346411 Fix order of properties in drone templates 2024-11-26 12:43:21 +01:00
0d6f3a4654 Load enabled services from machine config 2024-11-25 19:11:14 +01:00
229ad0b149 Ensure nix channels are functioning 2024-11-25 15:19:13 +01:00
bb441b38d0 Force running actions as setup-user 2024-11-25 15:19:01 +01:00
bd394560a3 Skip backup questions if specified 2024-11-23 17:26:12 +01:00
ee3a114d52 Create backup whitelist for docker-compose 2024-11-23 16:57:11 +01:00
51146383bd Add a profile for the server 2024-11-22 17:31:18 +01:00
a67abc08c6 Add options for enabling docker-compose services 2024-11-22 17:31:08 +01:00
8b99247c60 Add scripts for installing woodpecker 2024-11-22 17:29:45 +01:00
9546178b4f Add scripts for installing wekan 2024-11-22 01:54:50 +01:00
a1c3176811 Add scripts for installing TrackMania server 2024-11-20 00:33:09 +01:00
bdcb868012 Replace yq with go-yq 2024-11-20 00:30:08 +01:00
e72accc181 Add scripts for installing TeamSpeak 2024-11-13 18:18:15 +01:00
6c844d177b Add scripts for installing ryot 2024-11-13 17:39:21 +01:00
66311a149b Add scripts for installing nextcloud 2024-11-13 16:25:39 +01:00
2553b28255 Restructure service overrides 2024-11-13 16:22:57 +01:00
ce0c94d913 Add scripts for installing Minecraft 2024-11-10 13:00:23 +01:00
aef1941c05 Add settings for allowing VPN access in lxc 2024-11-10 12:56:48 +01:00
76d060a410 Improve look & feel of lxc config 2024-11-10 12:56:34 +01:00
63a6740a4c Add scripts for installing jellyfin 2024-11-10 12:33:36 +01:00
529e91c4fa Add a script for installing forgejo 2024-11-07 23:58:06 +01:00
9c4a1fe11c Add scripts for installing drone 2024-11-07 18:33:16 +01:00
7069c2fe20 Allow configuring services with multiple domains 2024-11-07 11:54:50 +01:00
533d343054 Allow specifying domains per service 2024-11-07 03:31:48 +01:00
5e352d0cb7 Fetch FQDN from configuration 2024-11-07 03:01:45 +01:00
5e0ca4ec47 Generate nginx config using printf 2024-11-07 02:40:29 +01:00
1f4fef116a Add a function for initializing the service installation 2024-11-07 02:39:37 +01:00
f93414387a Rename public API 2024-11-06 19:34:27 +01:00
ef91b70ef9 Add /etc/localtime file in test container 2024-11-06 03:33:01 +01:00
253e6fabd6 Add a script for installing anki-sync 2024-11-06 03:32:45 +01:00
10 changed files with 60 additions and 28 deletions

View file

View file

@ -2,3 +2,4 @@ include:
- path:
- docker-compose.base.yml
- docker-compose.secrets.yml
- docker-compose.overrides.yml

View file

@ -0,0 +1,23 @@
services:
ci:
build:
context: .
dockerfile: ci.Dockerfile
restart: unless-stopped
env_file:
- server.common.env
docker:
image: drone/drone-runner-docker
restart: unless-stopped
env_file: runner.common.env
environment:
DRONE_RUNNER_NAME: docker-runner
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ssh:
image: drone/drone-runner-ssh
restart: unless-stopped
env_file:
- runner.common.env
environment:
DRONE_RUNNER_NAME: ssh-runner

View file

@ -1,26 +1,19 @@
services:
ci-template:
build:
context: .
dockerfile: ci.Dockerfile
restart: unless-stopped
env_file:
- server.common.env
extends:
file: docker-compose.core.yml
service: ci
env_file: []
environment: {}
docker-template:
image: drone/drone-runner-docker
restart: unless-stopped
extends:
file: docker-compose.core.yml
service: docker
depends_on: []
env_file:
- runner.common.env
environment:
DRONE_RUNNER_NAME: docker-runner
volumes:
- /var/run/docker.sock:/var/run/docker.sock
env_file: []
ssh-template:
image: drone/drone-runner-ssh
restart: unless-stopped
extends:
file: docker-compose.core.yml
service: ssh
depends_on: []
env_file:
- runner.common.env
environment:
DRONE_RUNNER_NAME: ssh-runner
env_file: []

View file

@ -19,7 +19,7 @@ begin
echo "{}" | sudo tee "$config" >/dev/null
echo "{}" | sudo tee "$secrets" >/dev/null
cp "$dir"/{ci.Dockerfile,.dockerignore} "$root"
cp "$dir"/{ci.Dockerfile,docker-compose.core.yml,.dockerignore} "$root"
echo "DRONE_JSONNET_ENABLED=true" | sudo tee "$root/server.common.env" >/dev/null
echo "DRONE_RUNNER_CAPACITY=2" | sudo tee "$root/runner.common.env" >/dev/null

View file

@ -19,7 +19,7 @@ services:
FORGEJO__actions__ENABLED: "true"
FORGEJO__openid__ENABLE_OPENID_SIGNUP: "false"
FORGEJO__cron.git_gc_repos__ENABLED: "true"
FORGEJO__cron.git_lfs: "true"
FORGEJO__cron.gc_lfs__ENABLED: "true"
volumes:
- ./data/forgejo:/data
- config:/data/gitea/conf
@ -40,7 +40,7 @@ services:
image: shenxn/protonmail-bridge
restart: unless-stopped
volumes:
- ./bridge:/root
- ./data/bridge:/root
runner:
image: gitea/act_runner
restart: unless-stopped

View file

@ -5,3 +5,4 @@ services:
- 127.0.0.1:1337:3000
- 127.0.0.1:1338:22
db: {}
runner: {}

View file

@ -20,22 +20,26 @@ begin
initializeServiceInstallation $argv
sudo cp "$dir/docker-compose.base.yml" "$root"
installDockerService $argv
set port (yq (getSSHPortKey) "$source" | mutatePort "$port")
DOMAIN=(getServiceDomain $server) PW=$pw DB=Git USER=forgejo PW=$pw begin
set -l gitEnv "$(getServiceKey "$service").environment"
set -l actEnv "$(getServiceKey "runner").environment"
set -l dbEnv "$(getServiceKey "db").environment"
PORT=$port yq "$(getSSHPortKey) = env(PORT)" "$source" | \
yq "$gitEnv.FORGEJO__server__DOMAIN = env(DOMAIN)" | \
yq "$gitEnv.FORGEJO__database__NAME = env(DB)" | \
yq "$gitEnv.FORGEJO__database__USER = env(USER)" | \
yq "$gitEnv.FORGEJO__database__PASSWD = env(PW)" | \
yq "$dbEnv.MARIADB_DATABASE = env(DB)" | \
yq "$dbEnv.MARIADB_USER = env(USER)" | \
yq "$dbEnv.MARIADB_PASSWORD = env(PW)" | \
URL="https://$DOMAIN/" yq "$actEnv.GITEA_INSTANCE_URL = env(URL)" | \
sudo tee "$secrets" >/dev/null
end
installDockerService $argv
end
function configureSW -V dir -V user -V service

View file

@ -59,13 +59,12 @@ begin
and yq "$envKey.PUID = $uid" "$file" | \
yq "$envKey.PGID = $gid" | \
yq -y . | \
sudo tee "$config" >/dev/null
end
cp "$config" "$file"
cp "$secrets" "$file"
URL="https://$(getServiceDomain "$domain" "")/" yq "$(getServiceKey "$service").environment.JELLYFIN_PublishedServerUrl = env(URL)" "$file" | \
sudo tee "$config" >/dev/null
sudo tee "$secrets" >/dev/null
for dir in "$root"/{downloads,config/{,jellyfin,flood,rtorrent,radarr,sonarr,lidarr,prowlarr},media/{,movies,series,music}}
sudo mkdir -p "$dir"

View file

@ -116,6 +116,7 @@ begin
sudo mkdir -p (getServiceRoot $argv)
sudo mkdir -p "$nginxRoot"
sudo mkdir -p (dirname (getServiceSecretsConfig $argv))
sudo touch "$root/docker-compose.overrides.yml"
sudo cp "$dir/docker-compose.yml" "$root"
end
@ -172,7 +173,17 @@ begin
sudo systemctl restart nginx
end
function getExtraBackupPatterns
echo ""
end
function getBackupArgs
printf "%s\n" --base-directory (getServiceRoot $argv) --hidden --no-ignore "^(docker-compose\.secrets\.yml|data)\$"
set -l extraPatterns (getExtraBackupPatterns)
if [ -n "$extraPatterns" ]
set extraPatterns "|$extraPatterns"
end
printf "%s\n" --base-directory (getServiceRoot $argv) --hidden --no-ignore "^(docker-compose\.(secrets|overrides)\.yml|data)\$$extraPatterns"
end
end