services: # A node web service - type: web name: api env: node repo: https://github.com/funmusicplace/mirlo.git # optional region: oregon # optional (defaults to oregon) branch: main # optional (defaults to master) plan: standard # Supposedly this should be free but buildCommand: corepack enable && yarn install --immutable && yarn prisma:build && yarn prisma:migrate:deploy && NODE_OPTIONS=--max-old-space-size=3072 yarn client:build && yarn api:build startCommand: node --conditions=mirlo-dist --enable-source-maps dist/index.js envVars: - key: SKIP_INSTALL_DEPS value: true - key: NODE_ENV value: production # Baked into the client at build time; the website ID comes from the # Umami dashboard after adding mirlo.space as a website there. - key: VITE_UMAMI_WEBSITE_ID sync: false - key: NODE_OPTIONS value: --max-old-space-size=1512 - key: DATABASE_URL fromDatabase: name: blackbrd property: connectionString - fromGroup: blackbrd - key: STORAGE_BACKEND value: s3 - key: REDIS_HOST fromService: type: redis name: redis property: host - key: REDIS_PORT fromService: type: redis name: redis property: port # Umami analytics (https://umami.is) # Runs against a separate `umami` database inside the existing blackbrd # Postgres instance. Umami is itself a Prisma app, so it must NOT share # Mirlo's database — both would write to the same _prisma_migrations table. # umami/entrypoint.sh does the DATABASE_URL rewrite to point at /umami; # blueprints don't support string interpolation in env var values, and # Render's dockerCommand field doesn't reliably preserve shell quoting for # && chains (it fails with "not found" on the whole command string), so # that logic lives in the Dockerfile instead — matches the pattern in the # root Dockerfile's own CMD. # One-time setup: # 1. psql # 2. CREATE DATABASE umami; # Default login is admin / umami — change it immediately after first deploy. - type: web name: umami env: docker dockerfilePath: ./umami/Dockerfile plan: starter region: oregon autoDeploy: false healthCheckPath: /api/heartbeat envVars: - key: BASE_DATABASE_URL fromDatabase: name: blackbrd property: connectionString - key: DATABASE_TYPE value: postgresql - key: APP_SECRET generateValue: true - key: DISABLE_TELEMETRY value: 1 # A worker - type: worker name: background env: docker plan: standard # optional (defaults to starter) dockerfilePath: ./Dockerfile # optional dockerCommand: node --conditions=mirlo-dist --enable-source-maps dist/jobs/queue-worker.js run disk: # this disk gets used to process audio. They should get moved to the # minIO service and deleted after upload name: data mountPath: /data sizeGB: 40 # optional # dockerContext: ./background/src # optional envVars: - key: DATABASE_URL fromDatabase: name: blackbrd property: connectionString - fromGroup: blackbrd - key: STORAGE_BACKEND value: s3 - key: REDIS_HOST fromService: type: redis name: redis property: host - key: REDIS_PORT fromService: type: redis name: redis property: port # A Redis instance - type: redis name: redis ipAllowList: # required - source: 0.0.0.0/0 description: everywhere plan: standard # optional (defaults to starter) maxmemoryPolicy: noeviction # optional (defaults to allkeys-lru) databases: - name: blackbrd plan: standard # databaseName: postgres # optional (Render may add a suffix) user: blackbrd # optional # ipAllowList: # optional (defaults to allow all) # - source: 203.0.113.4/30 # description: office # - source: 198.51.100.1 # description: home # - name: private database # databaseName: private # ipAllowList: [] # only allow internal connections # envVarGroups: # - name: conc-settings # envVars: # - key: CONCURRENCY # value: 2 # - key: SECRET # generateValue: true # - key: USER_PROVIDED_SECRET # sync: false # - name: stripe # envVars: # - key: STRIPE_API_URL # value: https://api.stripe.com/v2