This is a Dagster project scaffolded with dagster project scaffold.
First, install your Dagster code location as a Python package. By using the --editable flag, pip will install your Python package in "editable mode" so that as you develop, local code changes will automatically apply.
pip install -e ".[dev]"Then, start the Dagster UI web server:
dagster devOpen http://localhost:3000 with your browser to see the project.
You can start writing assets in orpheus_engine/assets.py. The assets are automatically loaded into the Dagster code location as you define them.
You can specify new Python dependencies in setup.py.
Tests are in the orpheus_engine_tests directory and you can run tests using pytest:
pytest orpheus_engine_testsIf you want to enable Dagster Schedules or Sensors for your jobs, the Dagster Daemon process must be running. This is done automatically when you run dagster dev.
Once your Dagster Daemon is running, you can start turning on schedules and sensors for your jobs.
The easiest way to deploy your Dagster project is to use Dagster+.
Check out the Dagster+ documentation to learn more.
This project includes a Docker Compose setup for deploying Dagster with PostgreSQL for metadata storage and AWS S3 for IO management. This is suitable for local testing and deployment platforms like Coolify.
Prerequisites:
- Docker and Docker Compose installed.
- AWS Credentials (Access Key ID, Secret Access Key, Region) configured where your environment can access them.
- An S3 bucket created for Dagster's IO Manager.
- PostgreSQL connection details (User, Password, DB Name, Host, Port).
- If deploying via Coolify, you can use Coolify's managed PostgreSQL service instead of the one defined in
docker-compose.yml.
- If deploying via Coolify, you can use Coolify's managed PostgreSQL service instead of the one defined in
Configuration (Local Environment):
-
Create
.envfile: In the project root directory (orpheus-engine/), create a file named.env. Do not commit this file to Git. -
Populate
.env: Add the following environment variables to the.envfile, replacing the placeholder values with your actual credentials and settings:# --- Dagster & Postgres --- # Use 'orpheus_engine_postgres' as host if using the compose service # If using external/Coolify Postgres, use its connection details DAGSTER_POSTGRES_USER=dagster DAGSTER_POSTGRES_PASSWORD=dagster DAGSTER_POSTGRES_DB=dagster POSTGRES_HOST=orpheus_engine_postgres POSTGRES_PORT=5432 # Optional: Port mapping for Dagster Webserver on your host machine DAGSTER_PORT=3000 # --- AWS --- AWS_ACCESS_KEY_ID=YOUR_AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=YOUR_AWS_SECRET_ACCESS_KEY AWS_REGION=your-aws-region # e.g., us-east-1 DAGSTER_S3_BUCKET=your-dagster-io-manager-bucket-name # Bucket for IO Manager # --- Application Secrets --- LOOPS_API_KEY=YOUR_LOOPS_API_KEY LOOPS_SESSION_TOKEN=YOUR_LOOPS_SESSION_TOKEN # If used GOOGLE_MAPS_API_KEY=YOUR_GOOGLE_MAPS_API_KEY GENDERIZE_API_KEY=YOUR_GENDERIZE_API_KEY # Optional AIRTABLE_PERSONAL_ACCESS_TOKEN=YOUR_AIRTABLE_TOKEN OPENAI_API_KEY=YOUR_OPENAI_KEY # Or other LiteLLM keys WAREHOUSE_COOLIFY_URL=YOUR_DLT_POSTGRES_URL # e.g., postgresql://user:pass@host:port/db # --- Dagster Environment --- # Set to 'development' for local testing (enables caches, etc.) # Set to 'production' for deployed environments DAGSTER_ENV=development
Running Locally:
- Ensure
docker-compose.ymlis in the project root directory (orpheus-engine/). - Ensure your
.envfile is populated in the project root. - From the project root directory, build the Docker images:
docker compose --env-file .env build
- Start the services in detached mode:
docker compose --env-file .env up -d
- Access the Dagster UI in your browser:
http://localhost:3000(or the port set byDAGSTER_PORTin your.envfile).
Stopping Services:
docker compose --env-file .env downCoolify Deployment:
- Push your code (ensure
docker-compose.ymlis in the root) to your Git repository. - In Coolify, create a new Application sourced from your Git repository.
- Select "Docker Compose" as the build pack.
- Set the "Docker Compose Location" to
docker-compose.yml(just the filename, as it's in the root). - Database:
- Option A (Recommended for Coolify): Use Coolify Managed Postgres.
- Ensure the
orpheus_engine_postgresservice andpostgres_datavolume are removed from yourdocker-compose.yml(as done in the latest commits). - Add a PostgreSQL service resource within your Coolify project.
- Ensure the
- Option B: Use Compose Managed Postgres.
- Keep the
orpheus_engine_postgresservice andpostgres_datavolume definitions indocker-compose.yml.
- Keep the
- Option A (Recommended for Coolify): Use Coolify Managed Postgres.
- Environment Variables: Configure all the necessary environment variables (as listed in the
.envsection above) within the Coolify application's "Environment Variables" settings. Use Coolify secrets for sensitive values.- If using Coolify Managed Postgres (Option A): You must set
POSTGRES_HOST,DAGSTER_POSTGRES_USER,DAGSTER_POSTGRES_PASSWORD,DAGSTER_POSTGRES_DB, andPOSTGRES_PORTin Coolify to match the connection details provided by the Coolify managed database service. - Crucially, set
DAGSTER_ENV=productionfor deployed environments.
- If using Coolify Managed Postgres (Option A): You must set
- Deploy the application via Coolify.