Add deployment Docker Compose file, testing utilities, security helpers, and database initialization script
- Introduced `docker-compose.deploy.yml` for deployment scenarios with pre-built Docker images. - Added `auth_test_utils.py` to simplify authentication testing in FastAPI. - Implemented `security.py` for token-based operations like file uploads and password resets. - Created `init_db.py` for database initialization and superuser creation during startup. - Updated dependencies and tests to support optional authentication in FastAPI. - Enhanced entrypoint script to handle database initialization.
This commit is contained in:
@@ -4,5 +4,9 @@ echo "Starting Backend"
|
||||
|
||||
# Apply database migrations
|
||||
alembic upgrade head
|
||||
|
||||
# Initialize database (creates first superuser if needed)
|
||||
python app/init_db.py
|
||||
|
||||
# Execute the command passed to docker run
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user