Page MenuHomePhabricator

Improve usability of our staging environment
Open, LowPublic


We have a staging environment at where code can be tested in a production-like setting before going live. The intention of the current staging environment is that it should automatically deploy whatever is built from the staging branch. In reality, it requires intervention by a shell user in the docker group to regularly restore a database backup.

It doesn't currently have a mechanism for automatically re initializing the database, so when changes come through that are incompatible with the previous database schema in the staging environment, migrations fail or the environment totally breaks. If the database was always starting from the same schema / state as production, breakages here would be informative (and relatively uncommon), but since the db continues on until someone intervenes, it builds up quirks over time until it breaks (which is almost every time the staging branch gets overwritten by a force push (such as deploying a new feature branch or rebasing from master).

Related Objects