|
| 1 | +# Devcontainer Configurations |
| 2 | + |
| 3 | +This directory contains multiple devcontainer configurations for different use cases. |
| 4 | + |
| 5 | +## 📋 Available Configurations |
| 6 | + |
| 7 | +### 1. `devcontainer.json` - **User/Demo** (Default) |
| 8 | +- **Purpose**: Quick start for new users or demos |
| 9 | +- **Docker Strategy**: Pulls pre-built images from Docker Hub |
| 10 | +- **Speed**: ⚡ Fast startup (30-60 seconds) |
| 11 | +- **Use Cases**: |
| 12 | + - New users trying out anomstack |
| 13 | + - Demos and presentations |
| 14 | + - Quick testing without development setup |
| 15 | + |
| 16 | +### 2. `devcontainer.dev.json` - **Development** |
| 17 | +- **Purpose**: Full development environment |
| 18 | +- **Docker Strategy**: Builds images locally with source code changes |
| 19 | +- **Speed**: 🐌 Slower startup (3-5 minutes) |
| 20 | +- **Use Cases**: |
| 21 | + - Active development on anomstack |
| 22 | + - Testing code changes |
| 23 | + - Contributing to the project |
| 24 | + |
| 25 | +## 🚀 How to Use |
| 26 | + |
| 27 | +### GitHub Codespaces |
| 28 | + |
| 29 | +1. **Default (User/Demo)**: Just click "Create codespace" - uses `devcontainer.json` |
| 30 | +2. **Development**: When creating a codespace, click "..." → "Configure dev container" → select `devcontainer.dev.json` |
| 31 | + |
| 32 | +### VS Code Dev Containers |
| 33 | + |
| 34 | +1. **Default**: Open folder in VS Code → "Reopen in Container" |
| 35 | +2. **Development**: |
| 36 | + - Open Command Palette (`Ctrl+Shift+P`) |
| 37 | + - "Dev Containers: Reopen in Container" |
| 38 | + - Select `devcontainer.dev.json` |
| 39 | + |
| 40 | +### Manual Selection |
| 41 | + |
| 42 | +You can also rename the files to switch defaults: |
| 43 | +```bash |
| 44 | +# Switch to development as default |
| 45 | +mv devcontainer.json devcontainer.user.json |
| 46 | +mv devcontainer.dev.json devcontainer.json |
| 47 | +``` |
| 48 | + |
| 49 | +## 🏗️ What Each Configuration Does |
| 50 | + |
| 51 | +### Both Configurations |
| 52 | +- Set up VS Code extensions for Python, Docker, and development |
| 53 | +- Forward ports: 3000 (Dagster), 5001 (Dashboard), 5432 (PostgreSQL) |
| 54 | +- Run initialization and post-create scripts |
| 55 | +- Enable Docker-in-Docker support |
| 56 | + |
| 57 | +### Key Differences |
| 58 | +| Feature | User/Demo | Development | |
| 59 | +|---------|-----------|-------------| |
| 60 | +| Docker Images | Pull from Hub | Build locally | |
| 61 | +| Startup Time | ~60 seconds | ~5 minutes | |
| 62 | +| Code Changes | View only | Full development | |
| 63 | +| Extensions | Basic set | Extended dev tools | |
| 64 | + |
| 65 | +## 🎯 Recommendations |
| 66 | + |
| 67 | +- **First time users**: Use default `devcontainer.json` |
| 68 | +- **Regular development**: Use `devcontainer.dev.json` |
| 69 | +- **Demos/presentations**: Use default `devcontainer.json` |
| 70 | +- **Contributing**: Use `devcontainer.dev.json` |
| 71 | + |
| 72 | +## 🔧 Services Available |
| 73 | + |
| 74 | +Both configurations provide: |
| 75 | +- **Dagster Webserver**: [http://localhost:3000](http://localhost:3000) |
| 76 | +- **Anomstack Dashboard**: [http://localhost:5001](http://localhost:5001) |
| 77 | +- **PostgreSQL Database**: `localhost:5432` |
| 78 | + |
| 79 | +## 📚 Documentation |
| 80 | + |
| 81 | +For more information, see the main [README.md](../README.md) and [DOCKER.md](../DOCKER.md) files. |
0 commit comments