forked from mtusi2026/mtusi2026lab2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
2.0 KiB
Plaintext
41 lines
2.0 KiB
Plaintext
# Clean clone -> build -> fresh volumes -> migrations from zero, 2026-10-12T17:08:32Z
|
|
$ git clone --branch solution/bvt2302-bodanyuk <repo> mtusi2026lab2 && cd mtusi2026lab2
|
|
eb92e8e bench: трек 2 — планы запросов, стоимость записи, backup/restore со сверкой
|
|
$ python scripts/init_secrets.py
|
|
created secrets/postgres_password
|
|
created secrets/valkey_password
|
|
created secrets/database_url
|
|
created secrets/cache_url
|
|
$ cp .env.example .env # + COMPOSE_PROJECT_NAME/APP_PUBLISH_PORT only to run beside the main stand
|
|
$ docker compose --env-file .env config --quiet
|
|
config OK
|
|
$ docker compose --env-file .env up -d --build --wait
|
|
Container mtusi-lab2-clean-api-1 Healthy
|
|
Container mtusi-lab2-clean-migrate-1 Exited
|
|
Container mtusi-lab2-clean-postgres-1 Healthy
|
|
Container mtusi-lab2-clean-valkey-1 Healthy
|
|
$ docker compose ps
|
|
SERVICE IMAGE STATUS
|
|
api mtusi-messenger:lab2 Up 6 seconds (healthy)
|
|
postgres postgres:18.6-bookworm@sha256:afc7e2d441324c0388fa80c3d24f733b4194a4eb7f47dd8ee2b08eb1a24a647c Up 13 seconds (healthy)
|
|
valkey valkey/valkey:8.1.3-bookworm@sha256:fea8b3e67b15729d4bb70589eb03367bab9ad1ee89c876f54327fc7c6e618571 Up 13 seconds (healthy)
|
|
$ docker compose logs migrate
|
|
migrate: 0001_init: applied
|
|
migrate: done, 1 migration file(s) checked
|
|
$ docker compose volume ls
|
|
mtusi-lab2-clean_pgdata
|
|
mtusi-lab2-clean_valkeydata
|
|
$ curl -i http://127.0.0.1:8081/health/ready
|
|
HTTP/1.1 200 OK
|
|
x-request-id: 38be4c9665124450b66c5d9218c596d9
|
|
{"status":"ok"}
|
|
$ docker compose exec api id; PID 1
|
|
uid=10001(app) gid=10001(app) groups=10001(app)
|
|
PID 1: python -m messenger
|
|
$ docker compose run --rm migrate # second run: idempotent
|
|
migrate: 0001_init: already applied, skipped
|
|
migrate: done, 1 migration file(s) checked
|
|
$ git status --short # secrets/.env must not be tracked
|
|
secrets/database_url
|
|
.env
|