# Move from standalone container to separate web and data containers

**URL:** https://meta.discourse.org/t/move-from-standalone-container-to-separate-web-and-data-containers/29413
**Category:** Sysadmins
**Tags:** docker, how-to, advanced-setup, two-container
**Created:** [May 29, 2015, 2:12pm UTC](https://meta.discourse.org/t/move-from-standalone-container-to-separate-web-and-data-containers/29413 "2015-05-29T14:12:22Z")
**Posts on this page:** 1
**Showing post:** 69

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [May 25, 2020, 6:29pm UTC](https://meta.discourse.org/t/move-from-standalone-container-to-separate-web-and-data-containers/29413/69 "2020-05-25T18:29:31Z")

</div>

If you want zero downtime, there’s a couple extra steps that need to be done - disable “post-migrations” on the new containers, roll out the new container fully, enable post-migrations, then roll out again. This will stop any column-dropping migrations from executing until the old code is no longer running.

There’s no #howto for this yet, it’s only documented here:

> [@Introducing Post Deployment Migration](https://meta.discourse.org/t/introducing-post-deployment-migration/98974):
>
> As of [https://github.com/discourse/discourse/commit/40fa96777ddad4698df20d6b8a61afcf87743ed7](https://github.com/discourse/discourse/commit/40fa96777ddad4698df20d6b8a61afcf87743ed7), we’re moving away from [our delayed drop pattern](https://github.com/discourse/discourse/blob/9bbc1ae7b2ed9bd7e73f3ec9de6cf12e09178612/db/fixtures/000_delayed_drops.rb) to remove a column from a table in the database. Inspired by [Gitlab’s pattern of post deployment migration](https://docs.gitlab.com/ee/development/post_deployment_migrations.html), we’ve added the ability to generate and run migrations that can be run after a deployment. SKIP\_POST\_DEPLOYMENT\_MIGRATIONS=1 rake db:migrate -\> deploy app servers SKIP\_POST\_DEPLOYMENT\_MIGRATIONS=0 rake db:migrate To generate a post deployment migra…

For the most part, though, most forums can live with a minute or three of downtime every month.

---

_[View the full topic](https://meta.discourse.org/t/move-from-standalone-container-to-separate-web-and-data-containers/29413)._
