-
Notifications
You must be signed in to change notification settings - Fork 1
[DevOps] Containerize the technology stack #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DevOps] Containerize the technology stack #57
Conversation
3999fef to
c8fb921
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request containerizes the SimBoard technology stack, introducing Docker and Docker Compose configurations for both development and production environments. The changes migrate the project from Poetry to UV for Python dependency management, add comprehensive containerization support, and update documentation to reflect the new Docker-based workflows.
Key Changes
- Docker Infrastructure: Added Dockerfiles for backend (Python 3.13 with UV) and frontend (Node with nginx), plus docker-compose.yml for production (with Traefik reverse proxy) and docker-compose.dev.yml for development (with hot-reload)
- Dependency Management Migration: Migrated backend from Poetry to UV package manager, updating pyproject.toml to use PEP 621 project format with hatchling as the build backend
- Development Workflow: Introduced separate bare-metal and Docker development environments with comprehensive Makefile commands for database management, container orchestration, and local development
Reviewed changes
Copilot reviewed 24 out of 28 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| backend/Dockerfile | Multi-stage build for Python backend using UV, with separate builder and runtime stages |
| backend/pyproject.toml | Migrated from Poetry to UV format with PEP 621 project metadata and hatchling build backend |
| backend/Makefile | Updated commands to use UV instead of Poetry for dependency management and execution |
| backend/.env.example | Enhanced configuration with Docker-specific settings and clearer documentation |
| backend/README.md | Simplified to reference root documentation and containerized setup |
| backend/app/main.py | Added /health endpoint for Docker healthchecks |
| backend/app/core/config.py | Updated cookie name from "simscope_auth" to "simboard_auth" and added extra="ignore" |
| backend/app/scripts/seed.py | Added OAuth user creation with GitHub-style authentication for development seeding |
| backend/app/scripts/rollback_seed.py | Extended to clean up user and OAuth account data |
| backend/tests/conftest.py | Updated database name reference in docstring from "earthframe_test" to "simboard_test" |
| backend/.dockerignore | Added to exclude unnecessary files from Docker build context |
| frontend/Dockerfile | Multi-stage build with Node 24 for building and nginx for serving static assets |
| frontend/nginx.conf | Added comprehensive nginx configuration with gzip, caching, SPA routing, and security headers |
| frontend/nginx-backend-not-found.conf | Added configuration to block backend routes on frontend domain |
| frontend/.env.example | Added configuration template for frontend with VITE_API_BASE_URL |
| frontend/README.md | Simplified to reference root documentation |
| docker-compose.yml | Production orchestration with Traefik, PostgreSQL, backend, and frontend services |
| docker-compose.dev.yml | Development orchestration with hot-reload, debugpy support, and volume mounting |
| Makefile | Significantly expanded with Docker commands, database management, and comprehensive help |
| README.md | Major rewrite with Docker-first approach, separate bare-metal and Docker quickstart guides |
| .env.example | Added root-level environment variables for Traefik and Docker image configuration |
| .dockerignore | Added root-level Docker ignore file |
| .vscode/simboard.code-workspace | Added Docker attach debugger configuration |
| .gitignore | Added .pnpm-store and workspace file to exclusions |
| .github/ISSUE_TEMPLATE/*.yml | Updated project name references from "EarthFrame" to "SimBoard" |
Comments suppressed due to low confidence (1)
.vscode/simboard.code-workspace:74
- The
localRootpath mapping is incorrect. It uses${workspaceFolder}/../backendbut since the workspace file is in.vscode/and the folders configuration shows the backend is at../backend, this should be${workspaceFolder}/backend(without the extra..) to properly map to the backend directory.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 24 out of 28 changed files in this pull request and generated 14 comments.
Comments suppressed due to low confidence (1)
.vscode/simboard.code-workspace:74
- The
localRootpath mapping is incorrect. It uses${workspaceFolder}/../backendwhich assumes the workspace folder is inside a subdirectory, but based on the folder structure in the workspace file,${workspaceFolder}likely refers to the root directory. This should be${workspaceFolder}/backendinstead to correctly map the local backend directory to the container's/appdirectory.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - traefik.http.services.${STACK_NAME:-simboard}-backend.loadbalancer.server.port=8000 | ||
| - traefik.http.routers.${STACK_NAME:-simboard}-backend-http.rule=Host(`api.${DOMAIN}`) | ||
| - traefik.http.routers.${STACK_NAME:-simboard}-backend-http.entrypoints=http | ||
| - traefik.http.routers.${STACK_NAME:-simboard}-backend-http.middlewares=https-redirect |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Traefik label references an https-redirect middleware that is not defined anywhere in this docker-compose.yml file. This will cause the HTTP to HTTPS redirect to fail. You need to add a middleware definition, for example: - traefik.http.middlewares.https-redirect.redirectscheme.scheme=https and - traefik.http.middlewares.https-redirect.redirectscheme.permanent=true
| run: | ||
| @echo "$(GREEN)Starting FastAPI server...$(NC)" | ||
| poetry run uvicorn $(APP_NAME) --host $(HOST) --port $(PORT) | ||
| fastapi run $(APP_NAME) --host $(HOST) --port $(PORT) |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command uses fastapi run without the uv run prefix, but since UV is now the dependency manager, all Python commands should be prefixed with uv run to ensure they run in the correct virtual environment. This should be uv run fastapi run $(APP_NAME) --host $(HOST) --port $(PORT) for consistency with other commands in this Makefile.
- Add `uv run` to `backend/Makefile` commands - Update `.env.example` note about configuring postgres - Update `README.md` note about configuring postgres - Remove erroneous return user logic in `seed.py` - Remove overly-strict nginx config
- Standardized all Python commands in `backend/Makefile` to use `uv run` prefix for consistent dependency management - Fixed shell variable scoping issues in the root `Makefile` by wrapping the `start` target commands in a subshell - Improved PostgreSQL configuration documentation in `.env.example` and `README.md` for better developer onboarding
- **Docker Infrastructure**: Added Dockerfiles for backend (Python 3.13 with UV) and frontend (Node with nginx), plus docker-compose.yml for production (with Traefik reverse proxy) and docker-compose.dev.yml for development (with hot-reload) - **Dependency Management Migration**: Migrated backend from Poetry to UV package manager, updating pyproject.toml to use PEP 621 project format with hatchling as the build backend - **Development Workflow**: Introduced separate bare-metal and Docker development environments with comprehensive Makefile commands for database management, container orchestration, and local development
- Standardized all Python commands in `backend/Makefile` to use `uv run` prefix for consistent dependency management - Fixed shell variable scoping issues in the root `Makefile` by wrapping the `start` target commands in a subshell - Improved PostgreSQL configuration documentation in `.env.example` and `README.md` for better developer onboarding
Description
This pull request containerizes the SimBoard technology stack, introducing Docker and Docker Compose configurations for both development and production environments. The changes migrate the project from Poetry to UV for Python dependency management, add comprehensive containerization support, and update documentation to reflect the new Docker-based workflows.
Key Changes
Steps to Complete
docker-compose.dev.ymlto orchestrate development mode for backend and frontenddocker-compose.ymlto orchestrate production mode for backend, frontend, and Traefikhttps://localhostChecklist
Deployment Notes (if any)