A starter template for deploying Aspire applications with Docker over SSH.
- Aspire CLI
- Docker
- Use this template
- Add your services to the AppHost
- Deploy:
aspire deploy
Or generate a GitHub Actions workflow:
aspire do gh-action-dcenv- Astro frontend
- AppHost configured for Docker Compose + SSH deploy
- Works with any Linux server running Docker
The AppHost configures a Docker Compose environment with SSH deploy support. YARP is used as a reverse proxy to serve the frontend and route requests.
Run aspire deploy to deploy directly from your machine. This will:
- Build container images for your services
- Push them to a container registry
- SSH into your target server
- Deploy via Docker Compose
Run aspire do gh-action-dcenv to set up automated deployments. This will:
- Generate a GitHub Actions workflow
- Create a GitHub environment with required secrets and variables
- Configure parameters (SSH host, registry, etc.)
Once set up, every push triggers an automatic deployment.
To enable HTTPS, set EnableHttps to true in apphost.settings.json:
{
"EnableHttps": true
}When enabled, the template uses Certbot to automatically obtain and configure Let's Encrypt certificates. You'll need to provide two parameters during deployment:
domain— Your domain name (e.g.,example.com)letsencrypt-email— Email for Let's Encrypt notifications
Certbot runs as a container, obtains the certificate, then YARP starts with HTTPS configured. Certificates are stored in a shared Docker volume and auto-renewed.
Note: If you toggle
EnableHttps, re-runaspire do gh-action-dcenvto regenerate the workflow with the updated configuration.