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 - rspace-docs:/data/docs environment: - NODE_ENV=production - STORAGE_DIR=/data/communities - BOOKS_DIR=/data/books - SWAG_ARTIFACTS_DIR=/data/swag-artifacts - PORT=3000 - FILES_DIR=/data/files - SPLATS_DIR=/data/splats - DOCS_STORAGE_DIR=/data/docs - INFISICAL_CLIENT_ID=${INFISICAL_CLIENT_ID} - INFISICAL_CLIENT_SECRET=${INFISICAL_CLIENT_SECRET} - INFISICAL_PROJECT_SLUG=rspace - INFISICAL_ENV=prod - INFISICAL_URL=http://infisical:8080 - 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 - 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 - TWENTY_API_URL=https://rnetwork.online 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" # rnotes.online — re-deployed standalone with Memory Card spec (Feb 22) - "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-docs: 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: