docs(deployment): add git pull step to full reset procedure
Some checks failed
Some checks failed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -513,17 +513,20 @@ Use this to reset the database from scratch. Stop workers first to avoid task co
|
|||||||
# 1. Stop everything
|
# 1. Stop everything
|
||||||
docker compose --profile full down
|
docker compose --profile full down
|
||||||
|
|
||||||
# 2. Rebuild ALL images (picks up latest code)
|
# 2. Pull latest code
|
||||||
|
git pull origin master
|
||||||
|
|
||||||
|
# 3. Rebuild ALL images (picks up latest code)
|
||||||
docker compose --profile full build
|
docker compose --profile full build
|
||||||
|
|
||||||
# 3. Start infrastructure only
|
# 4. Start infrastructure only
|
||||||
docker compose up -d db redis
|
docker compose up -d db redis
|
||||||
|
|
||||||
# 4. Wait for healthy
|
# 5. Wait for healthy
|
||||||
docker compose exec db pg_isready -U orion_user -d orion_db
|
docker compose exec db pg_isready -U orion_user -d orion_db
|
||||||
docker compose exec redis redis-cli ping
|
docker compose exec redis redis-cli ping
|
||||||
|
|
||||||
# 5. Drop and recreate schema
|
# 6. Drop and recreate schema
|
||||||
docker compose --profile full run --rm -e PYTHONPATH=/app api python -c "
|
docker compose --profile full run --rm -e PYTHONPATH=/app api python -c "
|
||||||
from app.core.config import settings
|
from app.core.config import settings
|
||||||
from sqlalchemy import create_engine, text
|
from sqlalchemy import create_engine, text
|
||||||
@@ -536,19 +539,19 @@ c.close()
|
|||||||
print('Schema reset complete')
|
print('Schema reset complete')
|
||||||
"
|
"
|
||||||
|
|
||||||
# 6. Run migrations
|
# 7. Run migrations
|
||||||
docker compose --profile full run --rm -e PYTHONPATH=/app api alembic upgrade heads
|
docker compose --profile full run --rm -e PYTHONPATH=/app api alembic upgrade heads
|
||||||
|
|
||||||
# 7. Seed in order
|
# 8. Seed in order
|
||||||
docker compose --profile full run --rm -e PYTHONPATH=/app api python scripts/seed/init_production.py
|
docker compose --profile full run --rm -e PYTHONPATH=/app api python scripts/seed/init_production.py
|
||||||
docker compose --profile full run --rm -e PYTHONPATH=/app api python scripts/seed/init_log_settings.py
|
docker compose --profile full run --rm -e PYTHONPATH=/app api python scripts/seed/init_log_settings.py
|
||||||
docker compose --profile full run --rm -e PYTHONPATH=/app api python scripts/seed/create_default_content_pages.py
|
docker compose --profile full run --rm -e PYTHONPATH=/app api python scripts/seed/create_default_content_pages.py
|
||||||
docker compose --profile full run --rm -e PYTHONPATH=/app api python scripts/seed/seed_email_templates.py
|
docker compose --profile full run --rm -e PYTHONPATH=/app api python scripts/seed/seed_email_templates.py
|
||||||
|
|
||||||
# 8. Start all services
|
# 9. Start all services
|
||||||
docker compose --profile full up -d
|
docker compose --profile full up -d
|
||||||
|
|
||||||
# 9. Verify
|
# 10. Verify
|
||||||
docker compose --profile full ps
|
docker compose --profile full ps
|
||||||
docker stats --no-stream --format "table {{.Name}}\t{{.MemUsage}}\t{{.MemPerc}}"
|
docker stats --no-stream --format "table {{.Name}}\t{{.MemUsage}}\t{{.MemPerc}}"
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user