diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index c2d14b2..1c0817a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -21,8 +21,7 @@ "tflint": "none", "terragrunt": "none" }, - "ghcr.io/va-h/devcontainers-features/uv:1": {}, - "ghcr.io/microsoft/aspire-devcontainer-feature/aspire:2": {} + "ghcr.io/va-h/devcontainers-features/uv:1": {} }, "customizations": { "vscode": { @@ -46,8 +45,7 @@ "dbaeumer.vscode-eslint", "bradlc.vscode-tailwindcss", "GitHub.copilot", - "ms-azuretools.vscode-azure-mcp-server", - "microsoft-aspire.aspire-vscode" + "ms-azuretools.vscode-azure-mcp-server" ] } }, diff --git a/.devcontainer/on-create.sh b/.devcontainer/on-create.sh index e60836a..78c36b2 100755 --- a/.devcontainer/on-create.sh +++ b/.devcontainer/on-create.sh @@ -56,6 +56,14 @@ else playwright install --with-deps chrome fi +# Install Aspire CLI for the MCP server (aspire agent mcp). +# Installed via the standalone script so we don't need .NET SDK or the VS Code +# extension (which pulls in C# DevKit and .NET Installer as dependencies). +if ! command -v aspire &> /dev/null; then + echo "🌐 Installing Aspire CLI..." + curl -sSL https://aspire.dev/install.sh | bash +fi + # Install Azure Functions Core Tools for local Durable Functions development. if ! command -v func &> /dev/null; then echo "⚡ Installing Azure Functions Core Tools..." diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh index 9d85b12..42c7995 100644 --- a/.devcontainer/post-create.sh +++ b/.devcontainer/post-create.sh @@ -51,9 +51,17 @@ if [ -f api/.env ] && ! grep -q "^DEBUG=true" api/.env; then printf '\nDEBUG=true\n' >> api/.env fi -# Run database migrations +# Disable HTTPS redirect for local OAuth (no TLS termination locally) +if [ -f api/.env ] && ! grep -q "^WEB_SECURITY__REQUIRE_HTTPS=" api/.env; then + echo "📝 Adding WEB_SECURITY__REQUIRE_HTTPS=false to api/.env..." + printf '\nWEB_SECURITY__REQUIRE_HTTPS=false\n' >> api/.env +fi + +# Run database migrations and sync curriculum content echo "🗄️ Running database migrations..." (cd api && uv run alembic upgrade head) +echo "📚 Syncing curriculum content into database..." +(cd api && uv run python -m learn_to_cloud_shared.cli.sync_curriculum) echo "✅ Setup complete!" echo "" diff --git a/api/.env.example b/api/.env.example index 7535b1d..9d88f76 100644 --- a/api/.env.example +++ b/api/.env.example @@ -7,6 +7,10 @@ DATABASE__URL=postgresql+asyncpg://postgres:postgres@db:5432/learn_to_cloud # in deployed environments (Container Apps sets this). ENVIRONMENT=development +# Disable HTTPS redirect for OAuth callback (localhost has no TLS). +# Production defaults to true since Azure Container Apps terminates TLS. +WEB_SECURITY__REQUIRE_HTTPS=false + # GitHub OAuth. Create an OAuth App at https://github.com/settings/developers # OAUTH__CLIENT_ID=your_github_client_id # OAUTH__CLIENT_SECRET=your_github_client_secret