Sample project to package and deploy windows service using habitat.
Basic service which writes to a file saying the service is up. This is based on the blog post on Habitat (blog post) with few modifications according to latest builds.
Murali Valluri (mvalluri.pub@gmail.com)
- Windows machine.
- Docker
- Habitat
# Clone the repo and cd to the repo
git clone
cd habitat-windows-service
# Update the origin name in habitat/plan.ps1
# Enter habitat studio
hab studio enter
# Build the application
build .
# Start the service
hab start ORIGIN_NAME/testioservice
# Verify that there are no errors
Get-SupervisorLog
# Verify that service is running
Get-Service TestIOService
# Watch the log file being updated every 20 secs
Get-Content C:\hab\svc\testioservice\data\status.txt -Wait
# Stop the service using
hab stop ORIGIN_NAME/testioservice
- Updating configurations
- Health checks
- Using environment variables
- Connecting to another service
- Uploading to Habitat origin