-
Notifications
You must be signed in to change notification settings - Fork 24
Deployment environment
Preston Thorpe edited this page Feb 14, 2025
·
2 revisions
UnlockEd is designed to be deployed in a Kubernetes (k8s) cluster. To function correctly, it requires multiple services, including:
- PostgreSQL (Database)
- NATS (Messaging system)
- Ory Hydra (OAuth 2.0 provider)
- Ory Kratos (Identity management)
- UnlockEd Server (Main backend API)
- Provider Middleware (Handles video and content processing)
- Cron Tasks (Handles scheduled jobs)
This guide covers the required environment variables necessary for a production deployment.
| Variable | Description | Example Value |
|---|---|---|
| APP_ENV | Defines the environment (production/development) | production |
| APP_KEY | Secret key for the application (stored in Kubernetes Secret) | <SECRET_KEY> |
| APP_URL | The public URL of the UnlockEd server | https://example.com |
| LOG_LEVEL | Logging level for debugging | debug |
| Variable | Description | Example Value |
|---|---|---|
| DB_HOST | PostgreSQL database hostname | postgres |
| DB_PORT | PostgreSQL port | 5432 |
| DB_USER | Database username | testing |
| DB_NAME | Database name | testing |
| DB_PASSWORD | Database password (should be stored securely) | ChangeMe! |
| Variable | Description | Example Value |
|---|---|---|
| HYDRA_ADMIN_URL | Ory Hydra Admin API URL | http://hydra:4445 |
| HYDRA_PUBLIC_URL | Ory Hydra Public API URL | http://hydra:4444 |
| KRATOS_ADMIN_URL | Ory Kratos Admin API URL | http://kratos:4434 |
| KRATOS_PUBLIC_URL | Ory Kratos Public API URL | http://kratos:4433 |
| ORY_TOKEN | API Token for Ory services | <SECRET_TOKEN> |
| Variable | Description | Example Value |
|---|---|---|
| NATS_URL | NATS server connection URL | nats://nats:4222 |
| NATS_USER | NATS authentication username | testing |
| NATS_PASSWORD | NATS authentication password | ChangeMe! |
| Variable | Description | Example Value |
|---|---|---|
| S3_BUCKET_NAME | S3 bucket used for storing video assets | unlockedv2 |
| AWS_REGION | AWS region for the S3 bucket | us-west-2 |
| IMG_FILEPATH | Path where thumbnails/images are stored | /imgs |
| BRIGHTSPACE_TEMP_DIR | Temporary directory for Brightspace exports | /videos |
| YOUTUBE_API_KEY | Google cloud API key for accessing the youtube API (Optional) | <API_KEY> |
| Variable | Description | Example Value |
|---|---|---|
| DOMAIN_ADMIN_EMAIL | Administrator email address | admin@example.com |
| EMAIL_FROM | Default email sender | support@mail.example.com |
| Variable | Description | Example Value |
|---|---|---|
| MIDDLEWARE_CRON_SCHEDULE | Cron schedule for periodic tasks | 0 22 * * * |
| MIGRATION_DIR | Directory for database migrations | ./migrations |
These environment variables are essential for running UnlockEd in a production environment. Ensure they are properly configured in your Kubernetes Secrets & ConfigMaps for security and reliability.
For additional configuration details, refer to further UnlockEd documentation or contact the team.