commit 0e30e5592307eb946113ce17b73a4b5593a4b873 Author: Aetos Skia Date: Sun Sep 21 18:48:48 2025 +0530 init diff --git a/.env b/.env new file mode 100644 index 0000000..507704a --- /dev/null +++ b/.env @@ -0,0 +1,10 @@ +# Environment variables +TZ=Asia/Kolkata +PUID=1000 +PGID=1000 +MONGO_USER=aetos +MONGO_PASS=vishesh23 + +# Host paths for volume binds +CONFIGS_PATH=/mnt/machine-spirit/configs +DATA_PATH=/mnt/machine-spirit/data diff --git a/README.md b/README.md new file mode 100644 index 0000000..1a762dd --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# Server Pi + +This Raspberry Pi hosts a full media management stack for personal use. It runs multiple Dockerized services and serves as the primary server for *arr stack operations and media requests. + +The main purpose of this Pi is to handle media management, indexing, and user requests via a self-hosted gateway. + +The services currently running are: + +- **Nginx**: Reverse proxy and main landing page for available services. It routes requests to local services and handles path and host headers. + +- **Ombi**: Media request management. Accessible at `http://:3579`. + +- **Sonarr**: TV show management and automation. Accessible internally on port `8989`. + +- **Radarr**: Movie management and automation. Accessible internally on port `7878`. + +- **Prowlarr**: Indexer management for *arr stack. Accessible internally on port `9696`. + +- **Jellyseerr**: Media request interface for Plex. Accessible internally on port `5055`. + +--- + +## Start services + +```bash +docker compose up -d +``` + +## Check Logs + +```bash +docker compose logs -f nginx +``` + +## Exec COntainer + +```bash +docker exec -it bash +``` + diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..c6a1abf --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,182 @@ +# Shared storage configuration +x-shared-storage: &shared_data_volume + type: bind + source: /mnt/machine-spirit/data/media-manager + target: /data + bind: + create_host_path: true + +# Service-specific volume configurations +x-volume-configs: + jellyseerr: &jellyseerr_volumes + - type: bind + source: /mnt/machine-spirit/configs/jellyseerr + target: /app/config + bind: + create_host_path: true + + prowlarr: &prowlarr_volumes + - type: bind + source: /mnt/machine-spirit/configs/prowlarr + target: /config + bind: + create_host_path: true + - <<: *shared_data_volume + + sonarr: &sonarr_volumes + - type: bind + source: /mnt/machine-spirit/configs/sonarr + target: /config + bind: + create_host_path: true + - <<: *shared_data_volume + + radarr: &radarr_volumes + - type: bind + source: /mnt/machine-spirit/configs/radarr + target: /config + bind: + create_host_path: true + - <<: *shared_data_volume + +services: + nginx: + image: nginx:alpine + container_name: nginx-media-proxy + ports: + - "80:80" + - "443:443" + volumes: + - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro + environment: + - TZ=${TZ} + networks: + - media-net + depends_on: + - prowlarr + - sonarr + - radarr + - ombi + healthcheck: + test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost"] + interval: 30s + timeout: 10s + retries: 3 + restart: unless-stopped + dns: + - 1.1.1.1 + - 8.8.8.8 + + jellyseerr: + image: fallenbagel/jellyseerr:latest + container_name: jellyseerr + expose: ["5055:5055"] + environment: + - PUID=${PUID} + - PGID=${PGID} + - TZ=${TZ} + volumes: *jellyseerr_volumes + networks: + - media-net + extra_hosts: + - "host.docker.internal:host-gateway" + restart: unless-stopped + dns: + - 1.1.1.1 + - 8.8.8.8 + + prowlarr: + image: lscr.io/linuxserver/prowlarr:latest + container_name: prowlarr + expose: ["9696"] + volumes: *prowlarr_volumes + environment: + - PUID=${PUID} + - PGID=${PGID} + - TZ=${TZ} + networks: + - media-net + extra_hosts: + - "host.docker.internal:host-gateway" + healthcheck: + test: [ "CMD", "curl", "-f", "http://localhost:9696" ] + interval: 1m + retries: 3 + restart: unless-stopped + dns: + - 1.1.1.1 + - 8.8.8.8 + + sonarr: + image: lscr.io/linuxserver/sonarr:latest + container_name: sonarr + expose: ["8989"] + volumes: *sonarr_volumes + environment: + - PUID=${PUID} + - PGID=${PGID} + - TZ=${TZ} + networks: + - media-net + extra_hosts: + - "host.docker.internal:host-gateway" + healthcheck: + test: [ "CMD", "curl", "-f", "http://localhost:8989" ] + interval: 1m + retries: 3 + restart: unless-stopped + dns: + - 1.1.1.1 + - 8.8.8.8 + + radarr: + image: lscr.io/linuxserver/radarr:latest + container_name: radarr + expose: ["7878"] + volumes: *radarr_volumes + environment: + - PUID=${PUID} + - PGID=${PGID} + - TZ=${TZ} + networks: + - media-net + extra_hosts: + - "host.docker.internal:host-gateway" + healthcheck: + test: [ "CMD", "curl", "-f", "http://localhost:7878" ] + interval: 1m + retries: 3 + restart: unless-stopped + dns: + - 1.1.1.1 + - 8.8.8.8 + + ombi: + image: lscr.io/linuxserver/ombi:latest + container_name: ombi + environment: + - PUID=${PUID} + - PGID=${PGID} + - TZ=${TZ} + volumes: + - /mnt/machine-spirit/configs/ombi:/config + ports: ["3579:3579"] + networks: + - media-net + extra_hosts: + - "host.docker.internal:host-gateway" + healthcheck: + test: [ "CMD", "curl", "-f", "http://localhost:3579" ] + interval: 1m + retries: 3 + restart: unless-stopped + dns: + - 1.1.1.1 + - 8.8.8.8 + +networks: + media-net: + driver: bridge + labels: + - "com.media-stack.network=main" + - "com.media-stack.description=Primary network for *arr stack communication with IPv6" diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..2a9843e --- /dev/null +++ b/nginx.conf @@ -0,0 +1,115 @@ +# Simple reverse proxy configuration +server { + listen 80; + server_name _; + + # Security headers + add_header X-Frame-Options "SAMEORIGIN" always; + add_header X-Content-Type-Options "nosniff" always; + + # Client settings + client_max_body_size 100M; + + location /ombi { + proxy_pass http://ombi:3579; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + # WebSocket support + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + + location /sonarr { + proxy_pass http://sonarr:8989; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + # WebSocket support + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + + location /radarr { + proxy_pass http://radarr:7878; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + # WebSocket support + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + + location /prowlarr { + proxy_pass http://prowlarr:9696; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + # WebSocket support + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + + # Main landing page + location = / { + return 200 ' + + + Media Server + + + +
+

Media Server

+
+
+ Ombi +

Request movies & TV shows

+
+
+ Sonarr +

TV show management

+
+
+ Radarr +

Movie management

+
+
+ Prowlarr +

Indexer management

+
+
+
+ +'; + add_header Content-Type text/html; + } + + # Health check + location /health { + access_log off; + return 200 "healthy\n"; + add_header Content-Type text/plain; + } +} +