2.9 KiB
2.9 KiB
Quick Start Guide
Starting the System
# Start all services
docker-compose up -d
# Watch the logs until services are ready
docker-compose logs -f
Wait until you see "Application startup complete", then press Ctrl+C.
Access the API:
- API: http://localhost:8000
- Docs: http://localhost:8000/docs
Testing the API
1. Register a new user
curl -X POST "http://localhost:8000/api/v1/auth/register" \
-H "Content-Type: application/json" \
-d '{
"email": "test@example.com",
"password": "testpass123",
"first_name": "Test",
"last_name": "User"
}'
2. Login
curl -X POST "http://localhost:8000/api/v1/auth/login-json" \
-H "Content-Type: application/json" \
-d '{
"email": "test@example.com",
"password": "testpass123"
}'
Save the access_token from the response.
3. Get your profile
curl -X GET "http://localhost:8000/api/v1/users/me" \
-H "Authorization: Bearer YOUR_TOKEN_HERE"
4. List membership tiers
curl -X GET "http://localhost:8000/api/v1/tiers/"
Docker Compose Commands
# Start services
docker-compose up -d
# Stop services
docker-compose down
# View logs (all services)
docker-compose logs -f
# View logs (specific service)
docker-compose logs -f backend
docker-compose logs -f mysql
# Restart services
docker-compose restart
# Rebuild after code changes
docker-compose up -d --build
# Check status
docker-compose ps
# Access MySQL CLI (using environment variables)
docker exec -it membership_mysql mysql -u "${DATABASE_USER}" -p"${DATABASE_PASSWORD}" "${DATABASE_NAME}"
# Create database backup
docker exec membership_mysql mysqldump -u "${DATABASE_USER}" -p"${DATABASE_PASSWORD}" "${DATABASE_NAME}" > backup_$(date +%Y%m%d_%H%M%S).sql
Default Admin Access
- Email: admin@swanseaairport.org
- Password: admin123
⚠️ Change this password immediately!
Common Tasks
Create a membership tier (admin)
- Login as admin
- Use the token in the Authorization header
- POST to
/api/v1/tiers/
Record a manual payment (admin)
- Login as admin
- POST to
/api/v1/payments/manual-payment
View all users (admin)
- Login as admin
- GET
/api/v1/users/
Troubleshooting
Check service status
docker-compose ps
View all logs
docker-compose logs -f
View backend logs only
docker-compose logs -f backend
View MySQL logs only
docker-compose logs -f mysql
Restart everything
docker-compose restart
Clean start (removes all data)
docker-compose down -v
docker-compose up -d
Next Steps
- Update
.envwith your Square and SMTP2GO credentials - Change the default admin password
- Create additional admin users
- Configure membership tiers as needed
- Test payment processing
- Customize email templates (coming soon)