mirror of
https://github.com/acedanger/docker.git
synced 2025-12-06 01:10:11 -08:00
Merge branch 'master' of https://github.com/acedanger/docker
This commit is contained in:
144
gitea/backup-gitea.sh
Normal file
144
gitea/backup-gitea.sh
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# filepath: /home/acedanger/docker/gitea/backup-gitea.sh
|
||||||
|
|
||||||
|
# Gitea Backup Script
|
||||||
|
# This script backs up Gitea data and PostgreSQL database
|
||||||
|
|
||||||
|
set -e # Exit on any error
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
BACKUP_DIR="/home/acedanger/backups/gitea"
|
||||||
|
DATE=$(date +"%Y%m%d_%H%M%S")
|
||||||
|
COMPOSE_FILE="/home/acedanger/docker/gitea/docker-compose.yml"
|
||||||
|
COMPOSE_DIR="/home/acedanger/docker/gitea"
|
||||||
|
|
||||||
|
# Create backup directory if it doesn't exist
|
||||||
|
mkdir -p "$BACKUP_DIR"
|
||||||
|
|
||||||
|
echo "Starting Gitea backup at $(date)"
|
||||||
|
|
||||||
|
# Change to compose directory
|
||||||
|
cd "$COMPOSE_DIR"
|
||||||
|
|
||||||
|
# Create timestamped backup directory
|
||||||
|
BACKUP_PATH="$BACKUP_DIR/gitea_backup_$DATE"
|
||||||
|
mkdir -p "$BACKUP_PATH"
|
||||||
|
|
||||||
|
# Backup PostgreSQL database
|
||||||
|
echo "Backing up PostgreSQL database..."
|
||||||
|
docker-compose exec -T db pg_dump -U ${POSTGRES_USER:-gitea} ${POSTGRES_DB:-gitea} > "$BACKUP_PATH/database.sql"
|
||||||
|
|
||||||
|
# Backup Gitea data volume
|
||||||
|
echo "Backing up Gitea data volume..."
|
||||||
|
docker run --rm \
|
||||||
|
-v gitea_gitea:/data:ro \
|
||||||
|
-v "$BACKUP_PATH":/backup \
|
||||||
|
alpine:latest \
|
||||||
|
tar czf /backup/gitea_data.tar.gz -C /data .
|
||||||
|
|
||||||
|
# Backup PostgreSQL data volume (optional, as we have the SQL dump)
|
||||||
|
echo "Backing up PostgreSQL data volume..."
|
||||||
|
docker run --rm \
|
||||||
|
-v gitea_postgres:/data:ro \
|
||||||
|
-v "$BACKUP_PATH":/backup \
|
||||||
|
alpine:latest \
|
||||||
|
tar czf /backup/postgres_data.tar.gz -C /data .
|
||||||
|
|
||||||
|
# Copy docker-compose configuration
|
||||||
|
echo "Backing up configuration files..."
|
||||||
|
cp "$COMPOSE_FILE" "$BACKUP_PATH/"
|
||||||
|
if [ -f ".env" ]; then
|
||||||
|
cp ".env" "$BACKUP_PATH/"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create a restore script
|
||||||
|
cat > "$BACKUP_PATH/restore.sh" << 'EOF'
|
||||||
|
#!/bin/bash
|
||||||
|
# Restore script for Gitea backup
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
RESTORE_DIR="$(dirname "$0")"
|
||||||
|
COMPOSE_DIR="/home/acedanger/docker/gitea"
|
||||||
|
|
||||||
|
echo "WARNING: This will stop Gitea and replace all data!"
|
||||||
|
read -p "Are you sure you want to continue? (yes/no): " confirm
|
||||||
|
|
||||||
|
if [ "$confirm" != "yes" ]; then
|
||||||
|
echo "Restore cancelled"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$COMPOSE_DIR"
|
||||||
|
|
||||||
|
# Stop services
|
||||||
|
echo "Stopping Gitea services..."
|
||||||
|
docker-compose down
|
||||||
|
|
||||||
|
# Remove existing volumes
|
||||||
|
echo "Removing existing volumes..."
|
||||||
|
docker volume rm gitea_gitea gitea_postgres || true
|
||||||
|
|
||||||
|
# Recreate volumes
|
||||||
|
echo "Creating volumes..."
|
||||||
|
docker volume create gitea_gitea
|
||||||
|
docker volume create gitea_postgres
|
||||||
|
|
||||||
|
# Restore Gitea data
|
||||||
|
echo "Restoring Gitea data..."
|
||||||
|
docker run --rm \
|
||||||
|
-v gitea_gitea:/data \
|
||||||
|
-v "$RESTORE_DIR":/backup:ro \
|
||||||
|
alpine:latest \
|
||||||
|
tar xzf /backup/gitea_data.tar.gz -C /data
|
||||||
|
|
||||||
|
# Start database for restore
|
||||||
|
echo "Starting database for restore..."
|
||||||
|
docker-compose up -d db
|
||||||
|
|
||||||
|
# Wait for database to be ready
|
||||||
|
echo "Waiting for database to be ready..."
|
||||||
|
sleep 10
|
||||||
|
|
||||||
|
# Restore database
|
||||||
|
echo "Restoring database..."
|
||||||
|
docker-compose exec -T db psql -U ${POSTGRES_USER:-gitea} -d ${POSTGRES_DB:-gitea} < "$RESTORE_DIR/database.sql"
|
||||||
|
|
||||||
|
# Start all services
|
||||||
|
echo "Starting all services..."
|
||||||
|
docker-compose up -d
|
||||||
|
|
||||||
|
echo "Restore completed!"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod +x "$BACKUP_PATH/restore.sh"
|
||||||
|
|
||||||
|
# Create info file
|
||||||
|
cat > "$BACKUP_PATH/backup_info.txt" << EOF
|
||||||
|
Gitea Backup Information
|
||||||
|
========================
|
||||||
|
Backup Date: $(date)
|
||||||
|
Backup Location: $BACKUP_PATH
|
||||||
|
Gitea Version: $(docker-compose exec -T server gitea --version | head -1)
|
||||||
|
PostgreSQL Version: $(docker-compose exec -T db postgres --version)
|
||||||
|
|
||||||
|
Files included:
|
||||||
|
- database.sql: PostgreSQL database dump
|
||||||
|
- gitea_data.tar.gz: Gitea data volume
|
||||||
|
- postgres_data.tar.gz: PostgreSQL data volume
|
||||||
|
- docker-compose.yml: Docker compose configuration
|
||||||
|
- .env: Environment variables (if exists)
|
||||||
|
- restore.sh: Restore script
|
||||||
|
|
||||||
|
To restore this backup, run:
|
||||||
|
cd $BACKUP_PATH
|
||||||
|
./restore.sh
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Cleanup old backups (keep last 7 days)
|
||||||
|
echo "Cleaning up old backups..."
|
||||||
|
find "$BACKUP_DIR" -type d -name "gitea_backup_*" -mtime +7 -exec rm -rf {} + 2>/dev/null || true
|
||||||
|
|
||||||
|
echo "Backup completed successfully!"
|
||||||
|
echo "Backup saved to: $BACKUP_PATH"
|
||||||
|
echo "Backup size: $(du -sh "$BACKUP_PATH" | cut -f1)"
|
||||||
43
gitea/docker-compose.yml
Normal file
43
gitea/docker-compose.yml
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
services:
|
||||||
|
server:
|
||||||
|
image: docker.gitea.com/gitea:latest
|
||||||
|
container_name: gitea
|
||||||
|
environment:
|
||||||
|
- USER_UID=${USER_UID}
|
||||||
|
- USER_GID=${USER_GID}
|
||||||
|
- GITEA__database__DB_TYPE=postgres
|
||||||
|
- GITEA__database__HOST=db:5432
|
||||||
|
- GITEA__database__NAME=${POSTGRES_USER}
|
||||||
|
- GITEA__database__USER=${POSTGRES_USER}
|
||||||
|
- GITEA__database__PASSWD=${POSTGRES_PASSWORD}
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- gitea
|
||||||
|
volumes:
|
||||||
|
- gitea:/data
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
ports:
|
||||||
|
- ${GITEA_HTTP_PORT:-3500}:3000
|
||||||
|
- ${GITEA_SSH_PORT:-2229}:22
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
db:
|
||||||
|
image: docker.io/library/postgres:14
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=${POSTGRES_USER}
|
||||||
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||||
|
- POSTGRES_DB=${POSTGRES_DB}
|
||||||
|
networks:
|
||||||
|
- gitea
|
||||||
|
volumes:
|
||||||
|
- postgres:/var/lib/postgresql/data
|
||||||
|
networks:
|
||||||
|
gitea:
|
||||||
|
external: false
|
||||||
|
volumes:
|
||||||
|
gitea:
|
||||||
|
driver: local
|
||||||
|
postgres:
|
||||||
|
driver: local
|
||||||
112
jellyfin/README.md
Normal file
112
jellyfin/README.md
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
# Jellyfin Docker Migration Guide
|
||||||
|
|
||||||
|
## ✅ Current Status
|
||||||
|
Your Jellyfin Docker container is now running successfully at http://localhost:8096
|
||||||
|
|
||||||
|
## 🎯 What's Working
|
||||||
|
- ✅ Docker Compose setup with named volumes
|
||||||
|
- ✅ Media libraries properly mapped:
|
||||||
|
- TV: `/mnt/share/media/tv` → `/data/tv`
|
||||||
|
- Anime: `/mnt/share/media/anime` → `/data/anime`
|
||||||
|
- Movies: `/mnt/share/media/movies` → `/data/movies`
|
||||||
|
- Kids Movies: `/mnt/share/media/movies_kids` → `/data/movies_kids`
|
||||||
|
- Babies: `/mnt/share/media/babies` → `/data/babies`
|
||||||
|
- ✅ Network ports configured (8096, 8920, 7359, 1900)
|
||||||
|
- ✅ Container health checks passing
|
||||||
|
|
||||||
|
## 🔧 Next Steps
|
||||||
|
|
||||||
|
### 1. Initial Setup
|
||||||
|
1. Open http://localhost:8096 in your browser
|
||||||
|
2. Complete the initial setup wizard
|
||||||
|
3. Create your admin user account
|
||||||
|
4. Add your media libraries using the paths above
|
||||||
|
|
||||||
|
### 2. Migrate Your Old Configuration (Optional)
|
||||||
|
If you want to copy specific settings from your bare metal installation:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Stop the container
|
||||||
|
docker compose down
|
||||||
|
|
||||||
|
# Copy specific config files (be selective to avoid database issues)
|
||||||
|
sudo docker cp /etc/jellyfin/branding.xml jellyfin_volume:/config/config/
|
||||||
|
sudo docker cp /etc/jellyfin/encoding.xml jellyfin_volume:/config/config/
|
||||||
|
sudo docker cp /etc/jellyfin/network.xml jellyfin_volume:/config/config/
|
||||||
|
|
||||||
|
# Restart the container
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Plugin Migration
|
||||||
|
Your old plugins were detected but may need to be reinstalled:
|
||||||
|
- Chapter Segments Provider
|
||||||
|
- Open Subtitles
|
||||||
|
- Playback Reporting
|
||||||
|
- Reports
|
||||||
|
- Session Cleaner
|
||||||
|
- Webhook
|
||||||
|
|
||||||
|
### 4. GPU Transcoding (When Ready)
|
||||||
|
Once you fix your NVIDIA drivers, uncomment these lines in `docker-compose.yml`:
|
||||||
|
```yaml
|
||||||
|
# NVIDIA GPU settings (uncomment when drivers are working)
|
||||||
|
# environment:
|
||||||
|
# - NVIDIA_VISIBLE_DEVICES=all
|
||||||
|
# - NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
|
||||||
|
# runtime: nvidia
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🛠️ NVIDIA Driver Fix
|
||||||
|
To enable GPU transcoding, you'll need to fix your NVIDIA drivers:
|
||||||
|
```bash
|
||||||
|
# Check what driver you need
|
||||||
|
ubuntu-drivers devices
|
||||||
|
|
||||||
|
# Install recommended driver
|
||||||
|
sudo ubuntu-drivers autoinstall
|
||||||
|
|
||||||
|
# Or install specific driver
|
||||||
|
sudo apt install nvidia-driver-470 # (or whatever version is recommended)
|
||||||
|
|
||||||
|
# Reboot
|
||||||
|
sudo reboot
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📋 File Locations
|
||||||
|
- **Docker Compose**: `/home/acedanger/docker/jellyfin/docker-compose.yml`
|
||||||
|
- **Migration Script**: `/home/acedanger/docker/jellyfin/migrate.sh`
|
||||||
|
- **Config Volume**: `jellyfin_jellyfin_config`
|
||||||
|
- **Cache Volume**: `jellyfin_jellyfin_cache`
|
||||||
|
|
||||||
|
## 🔄 Management Commands
|
||||||
|
```bash
|
||||||
|
# Start Jellyfin
|
||||||
|
docker compose up -d
|
||||||
|
|
||||||
|
# Stop Jellyfin
|
||||||
|
docker compose down
|
||||||
|
|
||||||
|
# View logs
|
||||||
|
docker compose logs -f jellyfin
|
||||||
|
|
||||||
|
# Restart Jellyfin
|
||||||
|
docker compose restart
|
||||||
|
|
||||||
|
# Update Jellyfin
|
||||||
|
docker compose pull && docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🚫 Old Bare Metal Service
|
||||||
|
To prevent conflicts, disable the old systemd service:
|
||||||
|
```bash
|
||||||
|
sudo systemctl stop jellyfin
|
||||||
|
sudo systemctl disable jellyfin
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🎬 Access Points
|
||||||
|
- **Web Interface**: http://localhost:8096
|
||||||
|
- **HTTPS** (if configured): https://localhost:8920
|
||||||
|
- **Server IP**: Your container is accessible at `10.0.12.2:8096` from the network
|
||||||
|
|
||||||
|
Your Jellyfin migration is complete! The container will automatically restart if your system reboots.
|
||||||
46
jellyfin/docker-compose.yml
Normal file
46
jellyfin/docker-compose.yml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
services:
|
||||||
|
jellyfin:
|
||||||
|
#image: jellyfin/jellyfin:latest
|
||||||
|
image: lscr.io/linuxserver/jellyfin:latest
|
||||||
|
container_name: jellyfin
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "8096:8096" # HTTP web UI
|
||||||
|
- "8920:8920" # HTTPS web UI (optional)
|
||||||
|
- "7359:7359/udp" # Discovery (optional)
|
||||||
|
- "1900:1900/udp" # DLNA (optional)
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- TZ=America/New_York
|
||||||
|
- JELLYFIN_PublishedServerUrl=http://192.168.68.67:8096
|
||||||
|
- JELLYFIN_LOG_LEVEL=Warning
|
||||||
|
# NVIDIA GPU settings (commented out due to driver issues)
|
||||||
|
# - NVIDIA_VISIBLE_DEVICES=all
|
||||||
|
# - NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
|
||||||
|
volumes:
|
||||||
|
- jellyfin_config:/config
|
||||||
|
- jellyfin_cache:/cache
|
||||||
|
# Media directories
|
||||||
|
- /mnt/share/media/anime:/data/anime
|
||||||
|
- /mnt/share/media/tv:/data/tv
|
||||||
|
- /mnt/share/media/babies:/data/babies
|
||||||
|
- /mnt/share/media/movies:/data/movies
|
||||||
|
- /mnt/share/media/movies_kids:/data/movies_kids
|
||||||
|
labels:
|
||||||
|
- diun.enable=true
|
||||||
|
# Hardware acceleration devices (commented out - no GPU drivers available)
|
||||||
|
# devices:
|
||||||
|
# - /dev/dri:/dev/dri # For Intel/AMD GPU
|
||||||
|
|
||||||
|
# Runtime for NVIDIA GPU support (commented out due to driver issues)
|
||||||
|
# runtime: nvidia
|
||||||
|
volumes:
|
||||||
|
jellyfin_config:
|
||||||
|
driver: local
|
||||||
|
jellyfin_cache:
|
||||||
|
driver: local
|
||||||
|
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
name: jellyfin_network
|
||||||
101
jellyfin/migrate.sh
Executable file
101
jellyfin/migrate.sh
Executable file
@@ -0,0 +1,101 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Jellyfin Docker Migrationif ! docker compose version &> /dev/null; then
|
||||||
|
echo "❌ Docker Compose not found. Please install Docker Compose first."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "✅ Docker and Docker Compose are available"pt
|
||||||
|
# This script helps migrate your bare metal Jellyfin installation to Docker
|
||||||
|
|
||||||
|
echo "=== Jellyfin Docker Migration Assistant ==="
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Check if Jellyfin service is running
|
||||||
|
if systemctl is-active --quiet jellyfin; then
|
||||||
|
echo "⚠️ Jellyfin service is currently running. Please stop it before migration:"
|
||||||
|
echo " sudo systemctl stop jellyfin"
|
||||||
|
echo " sudo systemctl disable jellyfin"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check for NVIDIA drivers and container toolkit
|
||||||
|
echo "🔍 Checking NVIDIA GPU support..."
|
||||||
|
if command -v nvidia-smi &> /dev/null; then
|
||||||
|
echo "✅ NVIDIA drivers detected"
|
||||||
|
if command -v nvidia-container-runtime &> /dev/null; then
|
||||||
|
echo "✅ NVIDIA Container Toolkit detected"
|
||||||
|
echo " You can uncomment the NVIDIA GPU sections in docker compose.yml"
|
||||||
|
else
|
||||||
|
echo "⚠️ NVIDIA Container Toolkit not found. Install it for GPU transcoding:"
|
||||||
|
echo " https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "ℹ️ NVIDIA drivers not detected. GPU transcoding will not be available."
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Check Docker and Docker Compose
|
||||||
|
echo "🔍 Checking Docker installation..."
|
||||||
|
if ! command -v docker &> /dev/null; then
|
||||||
|
echo "❌ Docker not found. Please install Docker first."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! command -v docker compose &> /dev/null && ! docker compose version &> /dev/null; then
|
||||||
|
echo "❌ Docker Compose not found. Please install Docker Compose first."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "✅ Docker and Docker Compose are available"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Migration steps
|
||||||
|
echo "📋 Migration Steps:"
|
||||||
|
echo "1. Copy your existing Jellyfin data to Docker volumes"
|
||||||
|
echo "2. Update media paths in docker compose.yml"
|
||||||
|
echo "3. Configure GPU transcoding (if applicable)"
|
||||||
|
echo "4. Start the container"
|
||||||
|
echo
|
||||||
|
|
||||||
|
# Offer to copy existing data
|
||||||
|
read -p "Do you want to copy existing Jellyfin data? (y/n): " -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
echo "🔄 Creating Docker volumes and copying data..."
|
||||||
|
|
||||||
|
# Create the container to create volumes
|
||||||
|
docker compose up --no-start
|
||||||
|
|
||||||
|
# Copy configuration data
|
||||||
|
if [ -d "/var/lib/jellyfin" ]; then
|
||||||
|
echo "📁 Copying Jellyfin data directory..."
|
||||||
|
sudo docker cp /var/lib/jellyfin/. jellyfin:/config/
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Copy cache if it exists
|
||||||
|
if [ -d "/var/cache/jellyfin" ]; then
|
||||||
|
echo "📁 Copying Jellyfin cache directory..."
|
||||||
|
sudo docker cp /var/cache/jellyfin/. jellyfin:/cache/
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "✅ Data migration completed"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "🎬 Next steps:"
|
||||||
|
echo "1. Edit docker compose.yml and update the media volume paths:"
|
||||||
|
echo " - Replace '/path/to/your/movies' with your actual movie directory"
|
||||||
|
echo " - Replace '/path/to/your/tv' with your actual TV shows directory"
|
||||||
|
echo " - Replace '/path/to/your/music' with your actual music directory"
|
||||||
|
echo
|
||||||
|
echo "2. If you have NVIDIA GPU and drivers installed:"
|
||||||
|
echo " - Uncomment the NVIDIA GPU sections in docker compose.yml"
|
||||||
|
echo
|
||||||
|
echo "3. Start Jellyfin:"
|
||||||
|
echo " docker compose up -d"
|
||||||
|
echo
|
||||||
|
echo "4. Access Jellyfin at: http://localhost:8096"
|
||||||
|
echo
|
||||||
|
echo "5. Optional: Stop and disable the systemd service:"
|
||||||
|
echo " sudo systemctl stop jellyfin"
|
||||||
|
echo " sudo systemctl disable jellyfin"
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
HOARDER_VERSION=release
|
KARAKEEP_VERSION=release
|
||||||
# openssl rand -base64 18
|
# openssl rand -base64 18
|
||||||
NEXTAUTH_SECRET=
|
NEXTAUTH_SECRET=
|
||||||
OPENAI_API_KEY=
|
OPENAI_API_KEY=
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
name: hoarder
|
name: karakeep
|
||||||
services:
|
services:
|
||||||
hoarder:
|
karakeep:
|
||||||
image: ghcr.io/karakeep-app/karakeep:${HOARDER_VERSION:-release}
|
image: ghcr.io/karakeep-app/karakeep:${KARAKEEP_VERSION:-release}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- data:/data
|
- hoarder_data:/data
|
||||||
ports:
|
ports:
|
||||||
- 3000:3000
|
- 3000:3000
|
||||||
environment:
|
environment:
|
||||||
@@ -38,10 +38,12 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
MEILI_NO_ANALYTICS: true
|
MEILI_NO_ANALYTICS: true
|
||||||
volumes:
|
volumes:
|
||||||
- meilisearch:/meili_data
|
- hoarder_meilisearch:/meili_data
|
||||||
labels:
|
labels:
|
||||||
- diun.enable=true
|
- diun.enable=true
|
||||||
volumes:
|
volumes:
|
||||||
meilisearch: null
|
hoarder_meilisearch:
|
||||||
data: null
|
external: true
|
||||||
|
hoarder_data:
|
||||||
|
external: true
|
||||||
networks: {}
|
networks: {}
|
||||||
@@ -136,9 +136,21 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
labels:
|
labels:
|
||||||
- diun.enable=true
|
- diun.enable=true
|
||||||
|
huntarr:
|
||||||
|
image: huntarr/huntarr:latest
|
||||||
|
container_name: huntarr
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 9705:9705
|
||||||
|
volumes:
|
||||||
|
- huntarr_data:/config
|
||||||
|
environment:
|
||||||
|
- TZ=America/New_York
|
||||||
|
labels:
|
||||||
|
- diun.enable=true
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
gluetun_data: null
|
gluetun_data: null
|
||||||
sabnzbd_data: null
|
sabnzbd_data: null
|
||||||
tautulli: null
|
tautulli: null
|
||||||
networks: {}
|
huntarr_data: null
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db_storage:
|
db_data:
|
||||||
n8n_storage:
|
n8n_data:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
@@ -15,14 +13,15 @@ services:
|
|||||||
- POSTGRES_NON_ROOT_USER
|
- POSTGRES_NON_ROOT_USER
|
||||||
- POSTGRES_NON_ROOT_PASSWORD
|
- POSTGRES_NON_ROOT_PASSWORD
|
||||||
volumes:
|
volumes:
|
||||||
- db_storage:/var/lib/postgresql/data
|
- db_data:/var/lib/postgresql/data
|
||||||
- ./init-data.sh:/docker-entrypoint-initdb.d/init-data.sh
|
- ./init-data.sh:/docker-entrypoint-initdb.d/init-data.sh
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD-SHELL', 'pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
|
test:
|
||||||
|
- CMD-SHELL
|
||||||
|
- pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 10
|
retries: 10
|
||||||
|
|
||||||
n8n:
|
n8n:
|
||||||
image: docker.n8n.io/n8nio/n8n
|
image: docker.n8n.io/n8nio/n8n
|
||||||
restart: always
|
restart: always
|
||||||
@@ -33,12 +32,15 @@ services:
|
|||||||
- DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
|
- DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
|
||||||
- DB_POSTGRESDB_USER=${POSTGRES_NON_ROOT_USER}
|
- DB_POSTGRESDB_USER=${POSTGRES_NON_ROOT_USER}
|
||||||
- DB_POSTGRESDB_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD}
|
- DB_POSTGRESDB_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD}
|
||||||
|
- N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}
|
||||||
|
- N8N_RUNNERS_ENABLED=true
|
||||||
ports:
|
ports:
|
||||||
- 5678:5678
|
- 5678:5678
|
||||||
links:
|
links:
|
||||||
- postgres
|
- postgres
|
||||||
volumes:
|
volumes:
|
||||||
- n8n_storage:/home/node/.n8n
|
- n8n_data:/home/node/.n8n
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
|
|||||||
13
n8n/init-data.sh
Executable file
13
n8n/init-data.sh
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e;
|
||||||
|
|
||||||
|
|
||||||
|
if [ -n "${POSTGRES_NON_ROOT_USER:-}" ] && [ -n "${POSTGRES_NON_ROOT_PASSWORD:-}" ]; then
|
||||||
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||||
|
CREATE USER ${POSTGRES_NON_ROOT_USER} WITH PASSWORD '${POSTGRES_NON_ROOT_PASSWORD}';
|
||||||
|
GRANT ALL PRIVILEGES ON DATABASE ${POSTGRES_DB} TO ${POSTGRES_NON_ROOT_USER};
|
||||||
|
GRANT CREATE ON SCHEMA public TO ${POSTGRES_NON_ROOT_USER};
|
||||||
|
EOSQL
|
||||||
|
else
|
||||||
|
echo "SETUP INFO: No Environment variables given!"
|
||||||
|
fi
|
||||||
19
tailscale-subnet-router/compose.yaml
Normal file
19
tailscale-subnet-router/compose.yaml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
services:
|
||||||
|
tailscale:
|
||||||
|
image: tailscale/tailscale
|
||||||
|
container_name: tailscale-subnet-router
|
||||||
|
hostname: docker-router
|
||||||
|
environment:
|
||||||
|
- TS_EXTRA_ARGS=--advertise-routes=192.168.68.0/24 --ssh --advertise-exit-node --reset --hostname=docker-router
|
||||||
|
- TS_STATE_DIR=/var/lib/tailscale
|
||||||
|
- TS_USERSPACE=false
|
||||||
|
volumes:
|
||||||
|
- /var/lib/tailscale:/var/lib/tailscale
|
||||||
|
- /dev/net/tun:/dev/net/tun
|
||||||
|
network_mode: host
|
||||||
|
cap_add:
|
||||||
|
- net_admin
|
||||||
|
- net_raw
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
tailscale-data:
|
||||||
2
tailscale-subnet-router/resolv.conf
Normal file
2
tailscale-subnet-router/resolv.conf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
nameserver 1.1.1.1
|
||||||
|
nameserver 9.9.9.9
|
||||||
Reference in New Issue
Block a user