Upstream devcontainer configuration for Flask-based Campus applications in the nyjc-computing organization.
To use this configuration in your Flask project:
# Copy the devcontainer config to your project
cp -r devcontainer-flask/.devcontainer your-project/.devcontainer
cp devcontainer-flask/.gitignore your-project/.gitignoreOr if your project already has a .devcontainer folder, you can use the Dev Containers: Add Dev Container Configuration... command in VS Code and select "From existing configuration".
- Python 3.11 base image
- VS Code Python extensions (Python, Pylance)
- Automatic post-create setup
- Configures Git for fast-forward only pulls (
git config pull.ff true) - Installs Poetry for dependency management
- Installs
poetry-plugin-shellfor enhanced shell integration - Installs GitHub CLI (
gh) - Runs
poetry installifpyproject.tomlexists
Comprehensive Python/Flask gitignore including:
- Standard Python artifacts (
__pycache__,*.pyc, etc.) - Virtual environments (
.venv,venv/) - Sensitive files:
.env,.claude/, credentials, keys - IDE configurations (VS Code, PyCharm, etc.)
- Development databases (
*.db,*.sqlite) - OS-specific files
Projects with additional requirements (e.g., database services) can extend this base configuration:
{
"name": "Python Flask DevContainer",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
// ... rest of config
}See the campus project for a complete example with PostgreSQL and MongoDB services.
- VS Code with Dev Containers extension
- Docker or Docker Desktop
- A Flask project with
pyproject.toml(Poetry)
MIT