Compare commits
29 commits
96024edac5
...
cbdf3c4f5c
Author | SHA1 | Date | |
---|---|---|---|
cbdf3c4f5c | |||
8d66faf043 | |||
027568a3f7 | |||
fb50b642f1 | |||
e097c62900 | |||
37aeb44cf2 | |||
48838c7006 | |||
95ffa4bbfd | |||
900285cb92 | |||
629ee080bf | |||
4583ef52a4 | |||
dcf0bb9916 | |||
75293b819f | |||
3591da4b72 | |||
1eaff2dff0 | |||
6bcf992828 | |||
b32c504ecd | |||
23b694895b | |||
7d3c9949ad | |||
48da0766cf | |||
f533c495f8 | |||
e1a43a22e3 | |||
38fe8e14dd | |||
45ec86f21d | |||
9449aaddb3 | |||
a481db2c50 | |||
e931dcb56a | |||
40b0e8e68f | |||
aac921f87b |
10 changed files with 28 additions and 60 deletions
0
scripts/Common/Software/docker/services/anki-sync/main.fish
Executable file → Normal file
0
scripts/Common/Software/docker/services/anki-sync/main.fish
Executable file → Normal file
|
@ -2,4 +2,3 @@ include:
|
||||||
- path:
|
- path:
|
||||||
- docker-compose.base.yml
|
- docker-compose.base.yml
|
||||||
- docker-compose.secrets.yml
|
- docker-compose.secrets.yml
|
||||||
- docker-compose.overrides.yml
|
|
||||||
|
|
|
@ -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
|
|
|
@ -1,19 +1,26 @@
|
||||||
services:
|
services:
|
||||||
ci-template:
|
ci-template:
|
||||||
extends:
|
build:
|
||||||
file: docker-compose.core.yml
|
context: .
|
||||||
service: ci
|
dockerfile: ci.Dockerfile
|
||||||
env_file: []
|
restart: unless-stopped
|
||||||
environment: {}
|
env_file:
|
||||||
|
- server.common.env
|
||||||
docker-template:
|
docker-template:
|
||||||
extends:
|
image: drone/drone-runner-docker
|
||||||
file: docker-compose.core.yml
|
restart: unless-stopped
|
||||||
service: docker
|
|
||||||
depends_on: []
|
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:
|
ssh-template:
|
||||||
extends:
|
image: drone/drone-runner-ssh
|
||||||
file: docker-compose.core.yml
|
restart: unless-stopped
|
||||||
service: ssh
|
|
||||||
depends_on: []
|
depends_on: []
|
||||||
env_file: []
|
env_file:
|
||||||
|
- runner.common.env
|
||||||
|
environment:
|
||||||
|
DRONE_RUNNER_NAME: ssh-runner
|
||||||
|
|
2
scripts/Common/Software/docker/services/drone/main.fish
Executable file → Normal file
2
scripts/Common/Software/docker/services/drone/main.fish
Executable file → Normal file
|
@ -19,7 +19,7 @@ begin
|
||||||
echo "{}" | sudo tee "$config" >/dev/null
|
echo "{}" | sudo tee "$config" >/dev/null
|
||||||
echo "{}" | sudo tee "$secrets" >/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_JSONNET_ENABLED=true" | sudo tee "$root/server.common.env" >/dev/null
|
||||||
echo "DRONE_RUNNER_CAPACITY=2" | sudo tee "$root/runner.common.env" >/dev/null
|
echo "DRONE_RUNNER_CAPACITY=2" | sudo tee "$root/runner.common.env" >/dev/null
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ services:
|
||||||
FORGEJO__actions__ENABLED: "true"
|
FORGEJO__actions__ENABLED: "true"
|
||||||
FORGEJO__openid__ENABLE_OPENID_SIGNUP: "false"
|
FORGEJO__openid__ENABLE_OPENID_SIGNUP: "false"
|
||||||
FORGEJO__cron.git_gc_repos__ENABLED: "true"
|
FORGEJO__cron.git_gc_repos__ENABLED: "true"
|
||||||
FORGEJO__cron.gc_lfs__ENABLED: "true"
|
FORGEJO__cron.git_lfs: "true"
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/forgejo:/data
|
- ./data/forgejo:/data
|
||||||
- config:/data/gitea/conf
|
- config:/data/gitea/conf
|
||||||
|
@ -40,7 +40,7 @@ services:
|
||||||
image: shenxn/protonmail-bridge
|
image: shenxn/protonmail-bridge
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/bridge:/root
|
- ./bridge:/root
|
||||||
runner:
|
runner:
|
||||||
image: gitea/act_runner
|
image: gitea/act_runner
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
|
@ -5,4 +5,3 @@ services:
|
||||||
- 127.0.0.1:1337:3000
|
- 127.0.0.1:1337:3000
|
||||||
- 127.0.0.1:1338:22
|
- 127.0.0.1:1338:22
|
||||||
db: {}
|
db: {}
|
||||||
runner: {}
|
|
||||||
|
|
6
scripts/Common/Software/docker/services/forgejo/main.fish
Executable file → Normal file
6
scripts/Common/Software/docker/services/forgejo/main.fish
Executable file → Normal file
|
@ -20,26 +20,22 @@ begin
|
||||||
initializeServiceInstallation $argv
|
initializeServiceInstallation $argv
|
||||||
sudo cp "$dir/docker-compose.base.yml" "$root"
|
sudo cp "$dir/docker-compose.base.yml" "$root"
|
||||||
|
|
||||||
|
installDockerService $argv
|
||||||
set port (yq (getSSHPortKey) "$source" | mutatePort "$port")
|
set port (yq (getSSHPortKey) "$source" | mutatePort "$port")
|
||||||
|
|
||||||
DOMAIN=(getServiceDomain $server) PW=$pw DB=Git USER=forgejo PW=$pw begin
|
DOMAIN=(getServiceDomain $server) PW=$pw DB=Git USER=forgejo PW=$pw begin
|
||||||
set -l gitEnv "$(getServiceKey "$service").environment"
|
set -l gitEnv "$(getServiceKey "$service").environment"
|
||||||
set -l actEnv "$(getServiceKey "runner").environment"
|
|
||||||
set -l dbEnv "$(getServiceKey "db").environment"
|
set -l dbEnv "$(getServiceKey "db").environment"
|
||||||
|
|
||||||
PORT=$port yq "$(getSSHPortKey) = env(PORT)" "$source" | \
|
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__NAME = env(DB)" | \
|
||||||
yq "$gitEnv.FORGEJO__database__USER = env(USER)" | \
|
yq "$gitEnv.FORGEJO__database__USER = env(USER)" | \
|
||||||
yq "$gitEnv.FORGEJO__database__PASSWD = env(PW)" | \
|
yq "$gitEnv.FORGEJO__database__PASSWD = env(PW)" | \
|
||||||
yq "$dbEnv.MARIADB_DATABASE = env(DB)" | \
|
yq "$dbEnv.MARIADB_DATABASE = env(DB)" | \
|
||||||
yq "$dbEnv.MARIADB_USER = env(USER)" | \
|
yq "$dbEnv.MARIADB_USER = env(USER)" | \
|
||||||
yq "$dbEnv.MARIADB_PASSWORD = env(PW)" | \
|
yq "$dbEnv.MARIADB_PASSWORD = env(PW)" | \
|
||||||
URL="https://$DOMAIN/" yq "$actEnv.GITEA_INSTANCE_URL = env(URL)" | \
|
|
||||||
sudo tee "$secrets" >/dev/null
|
sudo tee "$secrets" >/dev/null
|
||||||
end
|
end
|
||||||
|
|
||||||
installDockerService $argv
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function configureSW -V dir -V user -V service
|
function configureSW -V dir -V user -V service
|
||||||
|
|
5
scripts/Common/Software/docker/services/jellyfin/main.fish
Executable file → Normal file
5
scripts/Common/Software/docker/services/jellyfin/main.fish
Executable file → Normal file
|
@ -59,12 +59,13 @@ begin
|
||||||
|
|
||||||
and yq "$envKey.PUID = $uid" "$file" | \
|
and yq "$envKey.PUID = $uid" "$file" | \
|
||||||
yq "$envKey.PGID = $gid" | \
|
yq "$envKey.PGID = $gid" | \
|
||||||
|
yq -y . | \
|
||||||
sudo tee "$config" >/dev/null
|
sudo tee "$config" >/dev/null
|
||||||
end
|
end
|
||||||
|
|
||||||
cp "$secrets" "$file"
|
cp "$config" "$file"
|
||||||
URL="https://$(getServiceDomain "$domain" "")/" yq "$(getServiceKey "$service").environment.JELLYFIN_PublishedServerUrl = env(URL)" "$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}}
|
for dir in "$root"/{downloads,config/{,jellyfin,flood,rtorrent,radarr,sonarr,lidarr,prowlarr},media/{,movies,series,music}}
|
||||||
sudo mkdir -p "$dir"
|
sudo mkdir -p "$dir"
|
||||||
|
|
|
@ -116,7 +116,6 @@ begin
|
||||||
sudo mkdir -p (getServiceRoot $argv)
|
sudo mkdir -p (getServiceRoot $argv)
|
||||||
sudo mkdir -p "$nginxRoot"
|
sudo mkdir -p "$nginxRoot"
|
||||||
sudo mkdir -p (dirname (getServiceSecretsConfig $argv))
|
sudo mkdir -p (dirname (getServiceSecretsConfig $argv))
|
||||||
sudo touch "$root/docker-compose.overrides.yml"
|
|
||||||
sudo cp "$dir/docker-compose.yml" "$root"
|
sudo cp "$dir/docker-compose.yml" "$root"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -173,17 +172,7 @@ begin
|
||||||
sudo systemctl restart nginx
|
sudo systemctl restart nginx
|
||||||
end
|
end
|
||||||
|
|
||||||
function getExtraBackupPatterns
|
|
||||||
echo ""
|
|
||||||
end
|
|
||||||
|
|
||||||
function getBackupArgs
|
function getBackupArgs
|
||||||
set -l extraPatterns (getExtraBackupPatterns)
|
printf "%s\n" --base-directory (getServiceRoot $argv) --hidden --no-ignore "^(docker-compose\.secrets\.yml|data)\$"
|
||||||
|
|
||||||
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
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue