Which is ok, but it assumes it's starting from scratch each time. This isn't viable for a production usage of this Docker setup. So, we could make an environment variable out of this DB_COMMAND which is what we did for Starlight.
This would allow passing db:migrate instead
Rationale
Flexibility for local development (i.e. don't lose existing data)
Support for upgrades to the Helm chart when the app is deployed in k8s
Descriptive summary
Currently we have the entrypoint script run:
bundle exec rake db:create db:schema:load
Which is ok, but it assumes it's starting from scratch each time. This isn't viable for a production usage of this Docker setup. So, we could make an environment variable out of this
DB_COMMAND
which is what we did for Starlight.This would allow passing
db:migrate
insteadRationale