services: rspace: build: context: . additional_contexts: encryptid-sdk: ../encryptid-sdk container_name: rspace-online restart: unless-stopped volumes: - rspace-data:/data/communities - rspace-books:/data/books - rspace-swag:/data/swag-artifacts - rspace-files:/data/files - rspace-splats:/data/splats environment: - NODE_ENV=production - STORAGE_DIR=/data/communities - BOOKS_DIR=/data/books - SWAG_ARTIFACTS_DIR=/data/swag-artifacts - PORT=3000 - INTERNAL_API_KEY=${INTERNAL_API_KEY} - DATABASE_URL=postgres://rspace:${POSTGRES_PASSWORD:-rspace}@rspace-db:5432/rspace - FLOW_SERVICE_URL=http://payment-flow:3010 - FLOW_ID=a79144ec-e6a2-4e30-a42a-6d8237a5953d - FUNNEL_ID=0ff6a9ac-1667-4fc7-9a01-b1620810509f - FILES_DIR=/data/files - SPLATS_DIR=/data/splats - X402_PAY_TO=${X402_PAY_TO:-} - X402_NETWORK=${X402_NETWORK:-eip155:84532} - X402_UPLOAD_PRICE=${X402_UPLOAD_PRICE:-0.01} - X402_FACILITATOR_URL=${X402_FACILITATOR_URL:-https://x402.org/facilitator} - R2_ENDPOINT=${R2_ENDPOINT} - R2_BUCKET=${R2_BUCKET:-rtube-videos} - R2_ACCESS_KEY_ID=${R2_ACCESS_KEY_ID} - R2_SECRET_ACCESS_KEY=${R2_SECRET_ACCESS_KEY} - R2_PUBLIC_URL=${R2_PUBLIC_URL} - UMAMI_URL=https://analytics.rspace.online - UMAMI_WEBSITE_ID=292f6ac6-79f8-497b-ba6a-7a51e3b87b9f - MAPS_SYNC_URL=wss://sync.rmaps.online - IMAP_HOST=mail.rmail.online - IMAP_PORT=993 - IMAP_TLS_REJECT_UNAUTHORIZED=false - HETZNER_API_TOKEN=${HETZNER_API_TOKEN} - CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN} - CLOUDFLARE_ZONE_ID=${CLOUDFLARE_ZONE_ID} - TWENTY_API_URL=https://rnetwork.online - TWENTY_API_TOKEN=${TWENTY_API_TOKEN} depends_on: rspace-db: condition: service_healthy labels: - "traefik.enable=true" # Main domain — serves landing + path-based routing - "traefik.http.routers.rspace-main.rule=Host(`rspace.online`)" - "traefik.http.routers.rspace-main.entrypoints=web" - "traefik.http.routers.rspace-main.priority=110" # Subdomains — backward compat for *.rspace.online canvas - "traefik.http.routers.rspace-canvas.rule=HostRegexp(`{subdomain:[a-z0-9-]+}.rspace.online`) && !Host(`rspace.online`) && !Host(`www.rspace.online`) && !Host(`auth.rspace.online`)" - "traefik.http.routers.rspace-canvas.entrypoints=web" - "traefik.http.routers.rspace-canvas.priority=100" # ── Standalone domain routing (priority 120) ── - "traefik.http.routers.rspace-rbooks.rule=Host(`rbooks.online`)" - "traefik.http.routers.rspace-rbooks.entrypoints=web" - "traefik.http.routers.rspace-rbooks.priority=120" - "traefik.http.routers.rspace-rbooks.service=rspace-online" - "traefik.http.routers.rspace-rpubs.rule=Host(`rpubs.online`)" - "traefik.http.routers.rspace-rpubs.entrypoints=web" - "traefik.http.routers.rspace-rpubs.priority=120" - "traefik.http.routers.rspace-rpubs.service=rspace-online" - "traefik.http.routers.rspace-rchoices.rule=Host(`rchoices.online`)" - "traefik.http.routers.rspace-rchoices.entrypoints=web" - "traefik.http.routers.rspace-rchoices.priority=120" - "traefik.http.routers.rspace-rchoices.service=rspace-online" - "traefik.http.routers.rspace-rfunds.rule=Host(`rfunds.online`)" - "traefik.http.routers.rspace-rfunds.entrypoints=web" - "traefik.http.routers.rspace-rfunds.priority=120" - "traefik.http.routers.rspace-rfunds.service=rspace-online" - "traefik.http.routers.rspace-rforum.rule=Host(`rforum.online`)" - "traefik.http.routers.rspace-rforum.entrypoints=web" - "traefik.http.routers.rspace-rforum.priority=120" - "traefik.http.routers.rspace-rforum.service=rspace-online" - "traefik.http.routers.rspace-rvote.rule=Host(`rvote.online`)" - "traefik.http.routers.rspace-rvote.entrypoints=web" - "traefik.http.routers.rspace-rvote.priority=120" - "traefik.http.routers.rspace-rvote.service=rspace-online" - "traefik.http.routers.rspace-rnotes.rule=Host(`rnotes.online`)" - "traefik.http.routers.rspace-rnotes.entrypoints=web" - "traefik.http.routers.rspace-rnotes.priority=120" - "traefik.http.routers.rspace-rnotes.service=rspace-online" - "traefik.http.routers.rspace-rwork.rule=Host(`rwork.online`)" - "traefik.http.routers.rspace-rwork.entrypoints=web" - "traefik.http.routers.rspace-rwork.priority=120" - "traefik.http.routers.rspace-rwork.service=rspace-online" - "traefik.http.routers.rspace-rcal.rule=Host(`rcal.online`)" - "traefik.http.routers.rspace-rcal.entrypoints=web" - "traefik.http.routers.rspace-rcal.priority=120" - "traefik.http.routers.rspace-rcal.service=rspace-online" - "traefik.http.routers.rspace-rtrips.rule=Host(`rtrips.online`)" - "traefik.http.routers.rspace-rtrips.entrypoints=web" - "traefik.http.routers.rspace-rtrips.priority=120" - "traefik.http.routers.rspace-rtrips.service=rspace-online" - "traefik.http.routers.rspace-rwallet.rule=Host(`rwallet.online`)" - "traefik.http.routers.rspace-rwallet.entrypoints=web" - "traefik.http.routers.rspace-rwallet.priority=120" - "traefik.http.routers.rspace-rwallet.service=rspace-online" - "traefik.http.routers.rspace-rdata.rule=Host(`rdata.online`)" - "traefik.http.routers.rspace-rdata.entrypoints=web" - "traefik.http.routers.rspace-rdata.priority=120" - "traefik.http.routers.rspace-rdata.service=rspace-online" - "traefik.http.routers.rspace-rnetwork.rule=Host(`rnetwork.online`)" - "traefik.http.routers.rspace-rnetwork.entrypoints=web" - "traefik.http.routers.rspace-rnetwork.priority=120" - "traefik.http.routers.rspace-rnetwork.service=rspace-online" - "traefik.http.routers.rspace-rtube.rule=Host(`rtube.online`)" - "traefik.http.routers.rspace-rtube.entrypoints=web" - "traefik.http.routers.rspace-rtube.priority=120" - "traefik.http.routers.rspace-rtube.service=rspace-online" - "traefik.http.routers.rspace-rmaps.rule=Host(`rmaps.online`)" - "traefik.http.routers.rspace-rmaps.entrypoints=web" - "traefik.http.routers.rspace-rmaps.priority=120" - "traefik.http.routers.rspace-rmaps.service=rspace-online" # Service configuration - "traefik.http.services.rspace-online.loadbalancer.server.port=3000" - "traefik.docker.network=traefik-public" networks: - traefik-public - rspace-internal - payment-network - rmail-mailcow rspace-db: image: postgres:16-alpine container_name: rspace-db restart: unless-stopped volumes: - rspace-pgdata:/var/lib/postgresql/data - ./db/init.sql:/docker-entrypoint-initdb.d/init.sql:ro environment: - POSTGRES_DB=rspace - POSTGRES_USER=rspace - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-rspace} healthcheck: test: ["CMD-SHELL", "pg_isready -U rspace"] interval: 5s timeout: 3s retries: 5 networks: - rspace-internal volumes: rspace-data: rspace-books: rspace-swag: rspace-files: rspace-splats: rspace-pgdata: networks: traefik-public: external: true payment-network: name: payment-infra_payment-network external: true rmail-mailcow: name: mailcowdockerized_mailcow-network external: true rspace-internal: