Compare commits

..

29 commits

Author SHA1 Message Date
cbdf3c4f5c Load enabled services from machine config 2024-11-25 19:11:14 +01:00
8d66faf043 Ensure nix channels are functioning 2024-11-25 15:19:13 +01:00
027568a3f7 Force running actions as setup-user 2024-11-25 15:19:01 +01:00
fb50b642f1 Skip backup questions if specified 2024-11-23 17:26:12 +01:00
e097c62900 Create backup whitelist for docker-compose 2024-11-23 16:57:11 +01:00
37aeb44cf2 Add a profile for the server 2024-11-22 17:31:18 +01:00
48838c7006 Add options for enabling docker-compose services 2024-11-22 17:31:08 +01:00
95ffa4bbfd Add scripts for installing woodpecker 2024-11-22 17:29:45 +01:00
900285cb92 Add scripts for installing wekan 2024-11-22 01:54:50 +01:00
629ee080bf Add scripts for installing TrackMania server 2024-11-20 00:33:09 +01:00
4583ef52a4 Replace yq with go-yq 2024-11-20 00:30:08 +01:00
dcf0bb9916 Add scripts for installing TeamSpeak 2024-11-13 18:18:15 +01:00
75293b819f Add scripts for installing ryot 2024-11-13 17:39:21 +01:00
3591da4b72 Add scripts for installing nextcloud 2024-11-13 16:25:39 +01:00
1eaff2dff0 Restructure service overrides 2024-11-13 16:22:57 +01:00
6bcf992828 Add scripts for installing Minecraft 2024-11-10 13:00:23 +01:00
b32c504ecd Add settings for allowing VPN access in lxc 2024-11-10 12:56:48 +01:00
23b694895b Improve look & feel of lxc config 2024-11-10 12:56:34 +01:00
7d3c9949ad Add scripts for installing jellyfin 2024-11-10 12:33:36 +01:00
48da0766cf Add a script for installing forgejo 2024-11-07 23:58:06 +01:00
f533c495f8 Add scripts for installing drone 2024-11-07 18:33:16 +01:00
e1a43a22e3 Allow configuring services with multiple domains 2024-11-07 11:54:50 +01:00
38fe8e14dd Allow specifying domains per service 2024-11-07 03:31:48 +01:00
45ec86f21d Fetch FQDN from configuration 2024-11-07 03:01:45 +01:00
9449aaddb3 Generate nginx config using printf 2024-11-07 02:40:29 +01:00
a481db2c50 Add a function for initializing the service installation 2024-11-07 02:39:37 +01:00
e931dcb56a Rename public API 2024-11-06 19:34:27 +01:00
40b0e8e68f Add /etc/localtime file in test container 2024-11-06 03:33:01 +01:00
aac921f87b Add a script for installing anki-sync 2024-11-06 03:32:45 +01:00
10 changed files with 28 additions and 60 deletions

View file

View file

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

View file

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

View file

@ -19,7 +19,7 @@ begin
echo "{}" | sudo tee "$config" >/dev/null
echo "{}" | sudo tee "$secrets" >/dev/null
cp "$dir"/{ci.Dockerfile,docker-compose.core.yml,.dockerignore} "$root"
cp "$dir"/{ci.Dockerfile,.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.gc_lfs__ENABLED: "true"
FORGEJO__cron.git_lfs: "true"
volumes:
- ./data/forgejo:/data
- config:/data/gitea/conf
@ -40,7 +40,7 @@ services:
image: shenxn/protonmail-bridge
restart: unless-stopped
volumes:
- ./data/bridge:/root
- ./bridge:/root
runner:
image: gitea/act_runner
restart: unless-stopped

View file

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

View file

@ -20,26 +20,22 @@ 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,12 +59,13 @@ begin
and yq "$envKey.PUID = $uid" "$file" | \
yq "$envKey.PGID = $gid" | \
yq -y . | \
sudo tee "$config" >/dev/null
end
cp "$secrets" "$file"
cp "$config" "$file"
URL="https://$(getServiceDomain "$domain" "")/" yq "$(getServiceKey "$service").environment.JELLYFIN_PublishedServerUrl = env(URL)" "$file" | \
sudo tee "$secrets" >/dev/null
sudo tee "$config" >/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,7 +116,6 @@ 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
@ -173,17 +172,7 @@ begin
sudo systemctl restart nginx
end
function getExtraBackupPatterns
echo ""
end
function getBackupArgs
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"
printf "%s\n" --base-directory (getServiceRoot $argv) --hidden --no-ignore "^(docker-compose\.secrets\.yml|data)\$"
end
end