50 lines
1.6 KiB
Markdown
50 lines
1.6 KiB
Markdown
# Python Template Project for i80.dk Nomad Infrastructure
|
||
|
||
**Last Updated:** 2025-11-28
|
||
|
||
This is a complete template for deploying Python web applications to your i80.dk Nomad infrastructure with Gitea CI/CD.
|
||
|
||
## 📋 What's Included
|
||
|
||
### Core Files
|
||
|
||
- **`app_example.py`** - Example Flask app with proper health endpoint
|
||
- **`Dockerfile.complete`** - Production-ready Dockerfile with security best practices
|
||
- **`requirements.txt`** - Python dependencies
|
||
- **`.gitea/workflows/nomad-job-complete.hcl.tmpl`** - Complete Nomad job with all features
|
||
- **`.gitea/workflows/main.yml.tmpl`** - Gitea Actions workflow for CI/CD
|
||
|
||
### Documentation
|
||
|
||
- **`NOMAD_DEPLOYMENT_GUIDE.md`** - Comprehensive deployment guide covering:
|
||
- ✅ Health check implementation (the #1 pain point!)
|
||
- ✅ Host volumes setup (the #2 pain point!)
|
||
- ✅ Vault workarounds (while Vault is down)
|
||
- ✅ Complete troubleshooting guide
|
||
|
||
### Utilities
|
||
|
||
- **`setup-nomad-volumes.sh`** - Automated script to setup volumes on Autobox
|
||
|
||
## 🚀 Quick Start
|
||
|
||
See **[NOMAD_DEPLOYMENT_GUIDE.md](./NOMAD_DEPLOYMENT_GUIDE.md)** for complete instructions.
|
||
|
||
Quick summary:
|
||
|
||
1. **Copy template** and customize for your project
|
||
2. **Implement /health endpoint** in your app (CRITICAL!)
|
||
3. **Setup volumes** on Autobox (if needed)
|
||
4. **Deploy** via Gitea or manually
|
||
|
||
## 📚 Documentation
|
||
|
||
- **[NOMAD_DEPLOYMENT_GUIDE.md](./NOMAD_DEPLOYMENT_GUIDE.md)** - Start here!
|
||
- **[~/Projects/i80_network.md](../i80_network.md)** - Full infrastructure docs
|
||
|
||
## <20><> Quick Links
|
||
|
||
- Nomad UI: https://nomad.i80.dk:4646
|
||
- Consul UI: https://consul.i80.dk:8500
|
||
- Gitea: https://gitea.i80.dk
|