cc694e71b4
- Add pyproject.toml with proper metadata and dependency groups - Create multi-stage Dockerfile for backend - Add docker-compose.yml with dev/prod profiles - Create frontend Dockerfile with nginx - Add .dockerignore for optimized builds - Update README with Docker instructions and troubleshooting - Remove requirements.txt in favor of pyproject.toml - Ensure data persistence with Docker volumes
1.8 KiB
1.8 KiB
ADDED Requirements
Requirement: Docker image builds successfully
The Docker image SHALL build without errors from the project root using docker build.
Scenario: Build from project root
- WHEN developer runs
docker build -t backup-tool . - THEN the image builds successfully with all dependencies installed
Requirement: Docker Compose orchestrates full stack
The docker-compose.yml SHALL start both backend and frontend services with a single command.
Scenario: Start full stack
- WHEN developer runs
docker compose up - THEN backend API is accessible on port 8000
- AND frontend is accessible on port 3000
- AND services can communicate with each other
Requirement: Development mode supports hot reload
The Docker setup SHALL support development mode with file watching and automatic reloading.
Scenario: Backend code changes trigger reload
- WHEN developer modifies a Python file in development mode
- THEN the backend service restarts automatically
- AND changes are reflected without manual container rebuild
Requirement: Production mode uses optimized build
The production Docker setup SHALL use multi-stage builds and serve static files efficiently.
Scenario: Production deployment
- WHEN developer runs
docker compose -f docker-compose.yml upin production configuration - THEN frontend assets are built and served by the backend
- AND no development servers are running
- AND image size is minimized
Requirement: Data persistence across restarts
The Docker setup SHALL preserve SQLite database and backup files across container restarts.
Scenario: Container restart preserves data
- WHEN docker containers are stopped and restarted
- THEN all existing backups and job history are preserved
- AND no data loss occurs