mirror of
https://github.com/bensuperpc/infrastructure.git
synced 2025-07-12 12:41:51 +02:00
Add tools and fix deps
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
@ -67,6 +67,10 @@ state:
|
||||
$(DOCKER_COMPOSE_COMMAND) ps
|
||||
$(DOCKER_COMPOSE_COMMAND) top
|
||||
|
||||
.PHONY: volumes
|
||||
volumes:
|
||||
$(DOCKER_COMPOSE_COMMAND) config --volumes
|
||||
|
||||
.PHONY: image-update
|
||||
image-update:
|
||||
$(DOCKER_COMPOSE_COMMAND) pull
|
||||
|
10
Makefile
10
Makefile
@ -16,16 +16,20 @@ BLOG_SERVICES := wordpress
|
||||
7DAYS_TO_DIE_SERVICES := 7daystodie_server 7daystodie_backup
|
||||
MINECRAFT_SERVICES := minecraft_server minecraft_backup
|
||||
SATISFACTORY_SERVICES := satisfactory_server satisfactory_backup
|
||||
GIT_SERVICES := forgejo forgejo-runner gitea gitea-runner
|
||||
GIT_SERVICES := forgejo forgejo-runner
|
||||
# gitea gitea-runner
|
||||
IA_SERVICES := open-webui
|
||||
SHARING_SERVICES := psitransfer picoshare privatebin projectsend jellyfin dufs syncthing
|
||||
TORRENTS_SERVICES := qbittorrent transmission
|
||||
UTILS_SERVICES := it-tools stirlingpdf omni-tools
|
||||
|
||||
MAIN_SERVICES := main_infrastructure caddy homepage
|
||||
|
||||
PROJECT_DIRECTORY := infrastructure
|
||||
|
||||
DOCKER_PROFILES := main_infrastructure caddy homepage \
|
||||
$(ADMIN_SERVICES) $(BLOG_SERVICES) $(GAME_SERVICES) \
|
||||
DOCKER_PROFILES := $(MAIN_SERVICES) \
|
||||
$(ADMIN_SERVICES) $(BLOG_SERVICES) $(7DAYS_TO_DIE_SERVICES) $(MINECRAFT_SERVICES) \
|
||||
$(SATISFACTORY_SERVICES) \
|
||||
$(GIT_SERVICES) $(IA_SERVICES) $(SHARING_SERVICES) \
|
||||
$(TORRENTS_SERVICES) $(UTILS_SERVICES)
|
||||
|
||||
|
@ -5,8 +5,6 @@ services:
|
||||
container_name: openssh
|
||||
profiles:
|
||||
- openssh
|
||||
depends_on:
|
||||
- caddy
|
||||
restart: on-failure:5
|
||||
env_file:
|
||||
- ./env/openssh.env
|
||||
@ -32,6 +30,12 @@ services:
|
||||
- minecraft_server_data:/minecraft_server_data:rw
|
||||
- minecraft_proxy_data:/minecraft_proxy_data:rw
|
||||
- minecraft_rcon_data:/minecraft_rcon_data:rw
|
||||
- forgejo_data:/forgejo_data:rw
|
||||
- forgejo_config:/forgejo_config:rw
|
||||
- forgejo_db:/forgejo_db:rw
|
||||
- gitea_data:/gitea_data:rw
|
||||
- gitea_config:/gitea_config:rw
|
||||
- gitea_db:/gitea_db:rw
|
||||
|
||||
networks:
|
||||
- infra-network
|
||||
@ -78,4 +82,16 @@ volumes:
|
||||
minecraft_rcon_data:
|
||||
name: minecraft_rcon_data
|
||||
# forgejo
|
||||
forgejo_data:
|
||||
name: forgejo_data
|
||||
forgejo_config:
|
||||
name: forgejo_config
|
||||
forgejo_db:
|
||||
name: forgejo_db
|
||||
# gitea
|
||||
gitea_data:
|
||||
name: gitea_data
|
||||
gitea_config:
|
||||
name: gitea_config
|
||||
gitea_db:
|
||||
name: gitea_db
|
75
tools/docker_volumes_export.sh
Executable file
75
tools/docker_volumes_export.sh
Executable file
@ -0,0 +1,75 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
volumes=(
|
||||
# satisfactory_server_config
|
||||
forgejo_data
|
||||
wordpress_db
|
||||
minecraft_proxy_data
|
||||
7daystodie_server_save
|
||||
stirlingpdf_tessdata
|
||||
wordpress
|
||||
gitea_db
|
||||
# wordpress_backup
|
||||
7daystodie_server_config_lgsm
|
||||
projectsend_share
|
||||
transmission_config
|
||||
# public_data
|
||||
projectsend_db
|
||||
projectsend_config
|
||||
7daystodie_server_log
|
||||
open-webui
|
||||
minecraft_rcon_data
|
||||
jellyfin_cache
|
||||
caddy_backup
|
||||
# satisfactory_backup
|
||||
homepage_log
|
||||
syncthing_config
|
||||
# 7daystodie_server_file
|
||||
openssh_config
|
||||
minecraft_server_backup
|
||||
qbittorrent_config
|
||||
7daystodie_backup
|
||||
gitea_runner
|
||||
gitea_config
|
||||
minecraft_server_data
|
||||
ollama
|
||||
caddy_data
|
||||
forgejo_config
|
||||
stirlingpdf_config
|
||||
uptimekuma_data
|
||||
# private_data
|
||||
yacht_config
|
||||
transmission_watch
|
||||
forgejo_db
|
||||
privatebin_data
|
||||
caddy_config
|
||||
psitransfer_data
|
||||
forgejo_certs
|
||||
forgejo_runner
|
||||
gitea_data
|
||||
jellyfin_config
|
||||
picoshare_data
|
||||
)
|
||||
|
||||
export_volume() {
|
||||
local volume="$1"
|
||||
echo "Exporting volume: $volume to $(pwd)/$volume.tar.gz"
|
||||
docker run --rm -v "$volume:/source" -v "$(pwd):/dest" alpine sh -c 'apk add --no-cache tar && tar --numeric-owner -cpvzf /dest/"$0.tar.gz" -C /source .' "$volume"
|
||||
|
||||
}
|
||||
|
||||
import_volume() {
|
||||
local volume="$1"
|
||||
echo "Importing volume: $volume from $(pwd)/$volume.tar.gz"
|
||||
#docker run --rm -v "$volume:/dest" -v "$(pwd):/source" alpine sh -c 'apk add --no-cache tar && tar --numeric-owner -xpvzf /source/"$0.tar.gz" -C /dest' "$volume"
|
||||
}
|
||||
|
||||
echo "Starting sync process..."
|
||||
|
||||
for ((i=0; i < ${#volumes[@]}; i++)); do
|
||||
export_volume "${volumes[$i]}"
|
||||
done
|
||||
|
||||
echo "Sync process completed."
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
|
Reference in New Issue
Block a user