From 15261c18ea337cdafa4b4e59876040d5a755d5eb Mon Sep 17 00:00:00 2001 From: Mike McFetridge <91107715+mmcfetridge1969@users.noreply.github.com> Date: Sun, 26 Jul 2026 08:32:16 -0400 Subject: [PATCH] Update --- Docker-Compose/Rackula/.env | 5 ++ Docker-Compose/Rackula/compose.yml | 109 +++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 Docker-Compose/Rackula/.env create mode 100644 Docker-Compose/Rackula/compose.yml diff --git a/Docker-Compose/Rackula/.env b/Docker-Compose/Rackula/.env new file mode 100644 index 0000000..dc44190 --- /dev/null +++ b/Docker-Compose/Rackula/.env @@ -0,0 +1,5 @@ +# Rackula Docker Configuration +# Copy this file to .env and customize as needed + +# Port to expose Rackula on (default: 8080) +RACKULA_PORT=8080 \ No newline at end of file diff --git a/Docker-Compose/Rackula/compose.yml b/Docker-Compose/Rackula/compose.yml new file mode 100644 index 0000000..7206921 --- /dev/null +++ b/Docker-Compose/Rackula/compose.yml @@ -0,0 +1,109 @@ +# Rackula Development Docker Compose +# +# For self-hosting with persistence, use: deploy/docker-compose.persist.yml +# Documentation: docs/guides/SELF-HOSTING.md +# +# Development usage: +# docker compose up -d # Frontend only (no persistence) +# docker compose --profile persist up -d # With API sidecar +# +# Environment variables: +# RACKULA_PORT: Host port for frontend (default: 8080) +# RACKULA_LISTEN_PORT: Port nginx listens on inside container (default: 8080) +# RACKULA_API_PORT: Port the API listens on (default: 3001) +# API_HOST: API hostname for nginx proxy (default: rackula-api) +# API_PORT: Derived from RACKULA_API_PORT (for nginx proxy target) + +services: + rackula: + image: ghcr.io/rackulalives/rackula:latest + # For persistence, use the :persist image instead: + # image: ghcr.io/rackulalives/rackula:persist + container_name: rackula + ports: + - "${RACKULA_PORT:-8080}:${RACKULA_LISTEN_PORT:-8080}" + environment: + # API proxy target (API_PORT derived from RACKULA_API_PORT) + - API_HOST=${API_HOST:-rackula-api} + - API_PORT=${RACKULA_API_PORT:-3001} + # nginx listen port inside container (allows matching host port if needed) + - RACKULA_LISTEN_PORT=${RACKULA_LISTEN_PORT:-8080} + restart: unless-stopped + stop_grace_period: 10s + + deploy: + resources: + limits: + cpus: "0.50" + memory: 128M + reservations: + cpus: "0.10" + memory: 16M + + security_opt: + - no-new-privileges:true + cap_drop: + - ALL + read_only: true + tmpfs: + - /var/cache/nginx:size=10M + - /var/run:size=1M + - /tmp:size=5M + - /etc/nginx/conf.d:size=1M,uid=101,gid=101 + + logging: + driver: json-file + options: + max-size: "10m" + max-file: "3" + + # API sidecar for persistent storage (optional) + # Enable with: docker compose --profile persist up -d + rackula-api: + profiles: [persist] + image: ghcr.io/rackulalives/rackula-api:latest + container_name: rackula-api + restart: unless-stopped + stop_grace_period: 10s + + volumes: + # Note: Host directory must be writable by container user (uid 1001) + # Run: mkdir -p ./data && sudo chown 1001:1001 ./data + - ./data:/data + + environment: + - DATA_DIR=/data + - RACKULA_API_PORT=${RACKULA_API_PORT:-3001} + + deploy: + resources: + limits: + cpus: "0.25" + memory: 64M + reservations: + cpus: "0.05" + memory: 16M + + security_opt: + - no-new-privileges:true + cap_drop: + - ALL + read_only: true + tmpfs: + - /tmp:size=5M + + healthcheck: + test: ["CMD", "wget", "-qO-", "http://127.0.0.1:${RACKULA_API_PORT:-3001}/health"] + interval: 30s + timeout: 10s + start_period: 5s + retries: 3 + + logging: + driver: json-file + options: + max-size: "5m" + max-file: "2" + + expose: + - "${RACKULA_API_PORT:-3001}" \ No newline at end of file