From af9e94080e612c26996d9e95cc4ab307b1d3a039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D0=BE=D0=BB=D0=B8=D0=BA=D0=BE=D0=B2=20Maximillian?= =?UTF-8?q?=20=D0=90=D0=BD=D1=82=D0=BE=D0=BD?= Date: Sun, 8 Nov 2026 22:12:14 +0300 Subject: [PATCH] fix(infra): lab5 fix docker entrypoints, migration index and worker deps --- Dockerfile | 2 +- backend/migrations/0007_drop_pending.sql | 1 + compose.yaml | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a9b29ba..326f405 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,4 +33,4 @@ USER app HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \ CMD wget -q -O - http://127.0.0.1:8080/health/live >/dev/null || exit 1 -ENTRYPOINT ["/server"] \ No newline at end of file +CMD ["/server"] \ No newline at end of file diff --git a/backend/migrations/0007_drop_pending.sql b/backend/migrations/0007_drop_pending.sql index dcc2d57..de112c9 100644 --- a/backend/migrations/0007_drop_pending.sql +++ b/backend/migrations/0007_drop_pending.sql @@ -13,6 +13,7 @@ ALTER TABLE attachments ADD CONSTRAINT attachments_error_code_consistency ); DROP INDEX IF EXISTS attachments_pending_idx; +DROP INDEX IF EXISTS attachments_active_idx; CREATE INDEX attachments_active_idx ON attachments (created_at) WHERE status IN ('queued', 'processing'); diff --git a/compose.yaml b/compose.yaml index dea121f..f951735 100644 --- a/compose.yaml +++ b/compose.yaml @@ -143,7 +143,7 @@ services: dockerfile: Dockerfile image: mtusi-messenger-api:lab3 restart: "no" - command: ["migrate"] + command: ["/server", "migrate"] environment: DATABASE_URL_FILE: /run/secrets/database_url secrets: @@ -250,6 +250,8 @@ services: condition: service_completed_successfully minio: condition: service_healthy + mc-init: + condition: service_completed_successfully rabbitmq: condition: service_healthy deploy: