Local Development Workflow
Initial Setup
1
Create project
helix init
with no arguments defaults to making a local instance called dev
.2
Define schema
Edit
db/schema.hx
:3
Create queries
Edit
db/queries.hx
:4
Validate
5
Build and deploy
6
Test connection
Development Iteration
When making changes during development:Working with Multiple Instances
Create different instances for different purposes:Multi-Environment Setup
Development → Staging → Production
Cloud Deployment Workflows
Helix Cloud Deployment
1
Authenticate
2
Initialize cloud instance
3
Configure production settings
Edit
helix.toml
:4
Deploy
5
Monitor
Fly.io Deployment
Prerequisites: Install and authenticateflyctl
1
Add Fly.io instance
2
Build and deploy
3
Check deployment
4
Scale if needed
AWS ECR Deployment
Prerequisites: Configure AWS CLI1
Add ECR instance
2
Build image
3
Push to ECR
- Create ECR repository if needed
- Authenticate Docker with ECR
- Tag and push the image
4
Deploy to ECS/EKS
Use the pushed image in your container orchestration:
Best Practices
Development Best Practices
Development Best Practices
- Always run
helix check
before deploying - Use descriptive instance names
- Keep development and production configurations separate
- Regularly clean up unused resources with
helix prune
- Version control your
helix.toml
file
Production Best Practices
Production Best Practices
- Use
build_mode = "release"
for production - Configure appropriate vector parameters for your data scale
- Enable monitoring and logging
- Set up automated backups
- Test migrations in staging first
Security Best Practices
Security Best Practices
- Never commit credentials to version control
- Use environment variables for sensitive data
- Regularly rotate API keys
- Keep CLI updated with
helix update
- Use private instances for production data