Skip to content

phoenixvc/azure-project-template

Repository files navigation

Azure Project Template

A production-ready template for creating Azure-deployed applications with multiple tech stack options.

Quick Start

1. Create Repository from Template

Click "Use this template" β†’ "Create a new repository"

Name your repo anything you want (e.g., my-awesome-api)

2. Initialize Your Project

After creating the repo, you have two options:

Option A: Visual Form (Recommended)

  1. Go to Actions tab
  2. Click "πŸš€ Initialize Project"
  3. Click "Run workflow"
  4. Fill in the form and click "Run workflow"

Workflow Form

Option B: Auto-Configuration

Name your repo following this pattern:

{org}-{env}-{project}-{techstack}

Example: nl-dev-myapi-fastapi

The workflow will auto-configure based on the name.

3. Start Developing

git clone https://github.com/your-org/your-repo
cd your-repo
make install
make dev

Available Tech Stacks

Stack Description Port
fastapi Python FastAPI - Simple REST API 8000
fastapi-hexagonal Python with Clean Architecture/DDD 8000
nodejs Node.js Express 3000
go Go with standard library 8080
dotnet .NET 8 Minimal API 8080
flutter Flutter mobile/web 80
reactnative React Native (Expo) 19000

Project Structure

After initialization, your project will have:

β”œβ”€β”€ .github/
β”‚   β”œβ”€β”€ workflows/
β”‚   β”‚   β”œβ”€β”€ ci.yml              # Lint, test, build
β”‚   β”‚   └── deploy.yml          # Azure deployment
β”‚   β”œβ”€β”€ ISSUE_TEMPLATE/
β”‚   β”œβ”€β”€ PULL_REQUEST_TEMPLATE.md
β”‚   β”œβ”€β”€ dependabot.yml
β”‚   └── CODEOWNERS
β”œβ”€β”€ infra/
β”‚   β”œβ”€β”€ main.bicep              # Infrastructure as Code
β”‚   └── modules/                # Modular Azure resources
β”‚       β”œβ”€β”€ app-service.bicep
β”‚       β”œβ”€β”€ container-app.bicep
β”‚       β”œβ”€β”€ postgres.bicep
β”‚       β”œβ”€β”€ key-vault.bicep
β”‚       β”œβ”€β”€ storage.bicep
β”‚       β”œβ”€β”€ app-insights.bicep
β”‚       └── redis.bicep
β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ dev.json
β”‚   β”œβ”€β”€ staging.json
β”‚   └── prod.json
β”œβ”€β”€ tests/
β”œβ”€β”€ .devcontainer/              # VS Code dev container
β”œβ”€β”€ docker-compose.yml          # Local development
β”œβ”€β”€ Makefile                    # Common commands
β”œβ”€β”€ CONTRIBUTING.md
└── [tech-stack-specific files]

Configuration Options

Option Values Description
Organization nl, pvc, tws, mys Your organization code
Environment dev, staging, prod Target environment
Region euw, eus, wus, san, saf Azure region
Tech Stack See table above Application framework

Common Commands

make install      # Install dependencies
make dev          # Run development server
make test         # Run tests
make lint         # Run linters
make format       # Format code
make docker-build # Build Docker image
make docker-run   # Run with Docker Compose

Azure Infrastructure

The template includes Bicep modules for:

  • App Service - Traditional web app hosting
  • Container Apps - Serverless containers
  • PostgreSQL - Managed database
  • Key Vault - Secrets management
  • Storage Account - Blob storage
  • Application Insights - Monitoring
  • Redis Cache - Caching layer

Deploy with:

az deployment sub create \
  --location westeurope \
  --template-file infra/main.bicep \
  --parameters infra/parameters/dev.bicepparam

CI/CD

  • CI runs on every push: lint, test, build, security scan
  • Deploy runs on push to main: deploys to Azure

Required GitHub Secrets:

  • AZURE_CREDENTIALS - Service principal for Azure

Required GitHub Variables:

  • ACR_NAME - Azure Container Registry name
  • WEBAPP_NAME or CONTAINER_APP_NAME - Deployment target

Development

Using Dev Container (Recommended)

  1. Install VS Code
  2. Install Dev Containers extension
  3. Open repo in VS Code
  4. Click "Reopen in Container"

Using Docker Compose

docker-compose up

This starts:

  • Your application
  • PostgreSQL database
  • Redis cache

Contributing

See CONTRIBUTING.md for development guidelines.

License

MIT

Releases

No releases published

Packages

 
 
 

Contributors