# Deploy ordering Coolify handles the standard deploy ordering automatically: the container image is pulled, `docker-entrypoint.sh` runs `prisma migrate deploy` against the live database, and only then does the Next.js process bind to the listener. This page documents the ordering explicitly for manual-rollback and partial-deploy scenarios where the operator drives the steps by hand. ## Migration ordering Migrations land **before** the new app container takes traffic. The canonical command sequence on a single-instance host: ```sh # 0. Nothing to do by hand for the way back: when the new image brings # migrations, its entrypoint first writes # healthlog-