Important
You do not need to use this repo to use Dagster+ Serverless. When you create an account on Dagster+, it creates a repo for you with the GitHub actions installed. If you want to deploy another project, you can use the Add code locations button on the Deployments page. This repo provides an alternative way to create a project linked to Dagster+ Serverless.
Welcome to your Dagster+ sample code repo. Here, you can find the code that's being deployed to your Dagster+ instance. For more information on Dagster+ Serverless, see our Serverless docs.
Pushing to production (the main
branch) will automatically kick off a workflow, which will redeploy your code to your prod
deployment.
Creating a pull request will kick off a workflow, which will create a new Branch Deployment, an ephemeral deployment where you can test your changes.
Important
If you had Dagster+ clone and set up this repo for you, you don't need to follow these instructions.
Click the Use this Template button, then select Create a new repository, and provide details for your new repo.
Set up secrets on your newly created repo by navigating to the Settings panel in your repo, clicking Secrets and variables in the left sidebar, and selecting Actions. Then, click New repository secret.
Name | Description |
---|---|
DAGSTER_CLOUD_API_TOKEN |
An agent token. For more details see the Dagster+ agent tokens guide. |
Replace the ORGANIZATION_NAME
in .github/workflows/dagster-plus-deploy.yml
with your Dagster+ organization name:
DAGSTER_CLOUD_URL: "https://ORGANIZATION_NAME.dagster.cloud"
At this point, the workflow should complete successfully. If builds are failing, ensure that your secrets are properly set and that your deployment has finished activating.
Now that your GitHub repo is setup with CI/CD to deploy to Dagster+, you can run this project locally and add your own Dagster code.
- Create a virtual environment with
uv
orvenv
. - Install local developement dependencies with
uv
orpip
:
uv pip install -e ".[dev]"
or
pip install -e ".[dev]"
- Run
dg dev
to view this repo in the Dagster UI:
dg dev
Tip
We have a number of additional Dagster example projects that you can clone and run locally, or use to create new code locations in Dagster+ Serverless.