Files
Brooke Kuhlmann cf67bc93a0 Added Docker entrypoint conditional setup for assets and migrations
Necessary to ensure assets and migrations are only setup for the _web_ service. This ensures other services, like the _worker_ service, don't end up duplicating this work. The new `APP_SETUP` environment variable controls this behavior and works for both Docker and Render.

The original idea stems from Max but has been modified to support both assets _and_ migrations.

This also fixes a typo in the `compose.dev.yml.tt` to do not adding the end quote in the right place.

Co-authored-by: Max Forasteiro <18661016+maxforasteiro@users.noreply.github.com>
Milestone: minor
2026-01-06 11:32:15 -07:00

57 lines
1.2 KiB
YAML

databases:
- name: terminus
plan: free
databaseName: terminus
postgresMajorVersion: 18
user: terminus
ipAllowList: []
services:
- type: web
name: terminus-web
plan: free
autoDeployTrigger: commit
healthCheckPath: /up
runtime: docker
envVars:
- key: API_URI
fromService:
type: web
name: terminus-web
property: host
- key: APP_SETUP
value: true
- key: HANAMI_PORT
value: 10000
- key: DATABASE_URL
fromDatabase:
name: terminus
property: connectionString
- key: KEYVALUE_URL
fromService:
type: keyvalue
name: terminus-keyvalue
property: connectionString
- type: worker
name: terminus-worker
plan: starter
autoDeployTrigger: commit
runtime: docker
envVars:
- key: DATABASE_URL
fromDatabase:
name: terminus
property: connectionString
- key: KEYVALUE_URL
fromService:
type: keyvalue
name: terminus-keyvalue
property: connectionString
dockerCommand: bundle exec sidekiq -r ./config/sidekiq.rb
- type: keyvalue
name: terminus-keyvalue
plan: free
ipAllowList: []