mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-24 02:59:59 +00:00
Closes #871. The deploy did docker rm -f then docker run. Nothing ran migrations, so new code met old tables, and nothing checked the result - a container that exits immediately left the site down with a green deploy. Now, in order: pull the image, run the migration with it, and only then touch what is running. A failed migration stops there, leaving old code with the old schema, which is at least self-consistent. The running container is renamed rather than removed, so it can be started again unchanged if the new one does not become healthy. Healthy means both an HTTP response and a database connection in the log: the captcha endpoint answers without touching the database, so it alone would call a container healthy that cannot reach MySQL.