Lots of changes to support Alembic and external DB
This commit is contained in:
54
README.md
54
README.md
@@ -28,12 +28,60 @@ A modern, containerized Prior Permission Required (PPR) system for aircraft oper
|
||||
### Prerequisites
|
||||
- Docker and Docker Compose installed
|
||||
|
||||
### 1. Start the System
|
||||
### Development Setup
|
||||
|
||||
**Start the system (automatic database setup):**
|
||||
```bash
|
||||
cd nextgen
|
||||
./start.sh
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
That's it! The container automatically:
|
||||
- Waits for database to be ready
|
||||
- Creates schema via Alembic migrations
|
||||
- Loads airport and aircraft reference data
|
||||
- Starts the API with auto-reload
|
||||
|
||||
**View startup logs:**
|
||||
```bash
|
||||
docker compose logs -f api
|
||||
```
|
||||
|
||||
### Production Deployment
|
||||
|
||||
**Simple automated deployment:**
|
||||
|
||||
```bash
|
||||
# 1. Configure environment
|
||||
cp .env.example .env
|
||||
nano .env # Set your external database credentials
|
||||
|
||||
# 2. Start with production settings
|
||||
docker compose -f docker-compose.prod.yml up -d
|
||||
```
|
||||
|
||||
The container automatically handles:
|
||||
- Database connection verification
|
||||
- Schema creation/migration (Alembic)
|
||||
- Reference data seeding (if needed)
|
||||
- Production server startup (4 workers)
|
||||
|
||||
**Monitor deployment:**
|
||||
```bash
|
||||
docker compose -f docker-compose.prod.yml logs -f api
|
||||
```
|
||||
|
||||
**Deploying updates with migrations:**
|
||||
```bash
|
||||
git pull
|
||||
docker compose -f docker-compose.prod.yml up -d --build
|
||||
# Migrations apply automatically!
|
||||
```
|
||||
|
||||
**See detailed guides:**
|
||||
- [`AUTOMATED_MIGRATION_GUIDE.md`](./AUTOMATED_MIGRATION_GUIDE.md) - How automatic migrations work
|
||||
- [`PRODUCTION_MIGRATION_GUIDE.md`](./PRODUCTION_MIGRATION_GUIDE.md) - Advanced migration strategies
|
||||
- [`MIGRATION_QUICK_REF.md`](./MIGRATION_QUICK_REF.md) - Quick reference commands
|
||||
|
||||
### 2. Access the Services
|
||||
- **API Documentation**: http://localhost:8001/docs
|
||||
- **API Base URL**: http://localhost:8001/api/v1
|
||||
|
||||
Reference in New Issue
Block a user