This commit is contained in:
smhk1376 committed 2026-10-15 10:10:30 +03:30
1 parent a99af426db
commit 8886aa8640
91 files changed
+2823 -773

No files matched your search

+7 -4
View File
@@ -5,10 +5,13 @@ Pushes to `master` run `.gitea/workflows/deploy.yml` on the existing
`local-host` runner. The checkout lives at `/opt/prod/Aut.ManagementFaculty`.
`scripts/deploy-production.sh` builds a Next.js standalone Docker image,
backs up the database, applies versioned migrations, checks a candidate
container, and replaces `aut-management-faculty`. It retains the previous
container and automatically restores it if the new container fails its
initial HTTPS check. Database migrations are not automatically reversed.
backs up the database to `/opt/backups/edu`, applies versioned migrations
(`node db/migrate.mjs` — idempotent via `schema_migrations`), checks a
candidate container, and replaces `aut-management-faculty`. It retains the
previous container and automatically restores it if the new container fails
its initial HTTPS check. Database migrations are forward-only (not
automatically reversed); the dump before migrate is the recovery path.
Uploaded admin images persist in the Docker volume `edu-uploads`.
Production settings are stored in `/etc/edu-production.env`, owned by root
with mode `600`. It contains `DATABASE_URL`, `NEXT_PUBLIC_SITE_URL`,