Quick Start
In a CI/CD environment, set theDATABASE_URL environment variable and run:
Environment Variables
Configure Geni using environment variables in your CI/CD pipeline:Database connection string. Required for all operations.Examples:
- PostgreSQL:
postgres://[email protected]:5432/app?sslmode=disable - MySQL:
mysql://root:password@localhost:3306/app - MariaDB:
mariadb://root:password@localhost:3307/app - SQLite:
sqlite://./database.sqlite - LibSQL/Turso:
https://localhost:6000
Authentication token for LibSQL/Turso databases. Only required when using Turso or LibSQL with authentication.
Path to the directory containing migration files.
Name of the table used to track applied migrations.
Time in seconds to wait for database connection before timing out. Useful when databases need time to boot.
Name of the schema dump file generated after migrations.
Set to
true to disable automatic schema dumping after migrations.Common Pipeline Patterns
Basic Migration
The simplest CI/CD integration runs migrations before deploying your application:With Database Token (Turso/LibSQL)
For LibSQL or Turso databases requiring authentication:Custom Migration Folder
If your migrations are in a non-standard location:With Wait Timeout
When your database needs time to initialize (useful in container environments):Security Best Practices
Use Secret Management
Always store
DATABASE_URL and DATABASE_TOKEN in your CI/CD platform’s secret management system. Never commit these values to version control.Limit Database Permissions
Use a database user with only the necessary permissions for running migrations. Avoid using root or admin credentials.
Review Migration Files
Ensure migration files are reviewed and tested before running in production environments.
Platform-Specific Examples
For detailed integration guides with specific CI/CD platforms:GitHub Actions
Use Geni in GitHub Actions workflows
Docker
Run Geni in Docker containers