Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
fc8272f
⚙️ FEATURE-#22: Add dotflow-cloud to cookiecutter cloud choices
FernandoCelmer Apr 14, 2026
550f3a4
⚙️ FEATURE-#22: Expose EXECUTION_MODE placeholder to cloud templates
FernandoCelmer Apr 14, 2026
8a252cf
⚙️ FEATURE-#22: Bump dotflow pin to 1.0.0.dev2 and override scheduler…
FernandoCelmer Apr 14, 2026
0ff2583
⚙️ FEATURE-#22: Convert workflow.py main() to factory with conditiona…
FernandoCelmer Apr 14, 2026
6a3b3c4
⚙️ FEATURE-#22: Document local run via dotflow start --workflow --mode
FernandoCelmer Apr 14, 2026
35b60ad
⚙️ FEATURE-#22: Switch docker CMD to dotflow start --workflow with mode
FernandoCelmer Apr 14, 2026
50a693b
⚙️ FEATURE-#22: Switch cloud-run CMD to dotflow start --workflow with…
FernandoCelmer Apr 14, 2026
8afb7fb
⚙️ FEATURE-#22: Switch cloud-run-scheduled CMD to dotflow start --wor…
FernandoCelmer Apr 14, 2026
9216187
⚙️ FEATURE-#22: Switch ecs CMD to dotflow start --workflow with mode
FernandoCelmer Apr 14, 2026
c3c8269
⚙️ FEATURE-#22: Switch ecs-scheduled CMD to dotflow start --workflow …
FernandoCelmer Apr 14, 2026
fdf68c9
⚙️ FEATURE-#22: Switch kubernetes CMD to dotflow start --workflow wit…
FernandoCelmer Apr 14, 2026
33b971a
⚙️ FEATURE-#22: Switch heroku CMD to dotflow start --workflow with mode
FernandoCelmer Apr 14, 2026
cf32d77
⚙️ FEATURE-#22: Switch fly-io CMD to dotflow start --workflow with mode
FernandoCelmer Apr 14, 2026
4e514c1
⚙️ FEATURE-#22: Switch railway CMD to dotflow start --workflow with mode
FernandoCelmer Apr 14, 2026
633afe0
⚙️ FEATURE-#22: Switch render CMD to dotflow start --workflow with mode
FernandoCelmer Apr 14, 2026
5de92d1
⚙️ FEATURE-#22: Switch digital-ocean CMD to dotflow start --workflow …
FernandoCelmer Apr 14, 2026
1efab2d
⚙️ FEATURE-#22: Switch azure-container CMD to dotflow start --workflo…
FernandoCelmer Apr 14, 2026
63d5948
⚙️ FEATURE-#22: Use dotflow start --workflow in heroku Procfile
FernandoCelmer Apr 14, 2026
d6aef07
⚙️ FEATURE-#22: Use dotflow start --workflow in heroku.yml
FernandoCelmer Apr 14, 2026
1a953e1
⚙️ FEATURE-#22: Use dotflow start --workflow in fly.toml
FernandoCelmer Apr 14, 2026
18e9d7b
⚙️ FEATURE-#22: Use dotflow start --workflow in railway.json
FernandoCelmer Apr 14, 2026
2fc1fe4
⚙️ FEATURE-#22: Use dotflow start --workflow in github-actions workflow
FernandoCelmer Apr 14, 2026
d13e58e
⚙️ FEATURE-#22: Simplify lambda handler to just call main()
FernandoCelmer Apr 14, 2026
308ec79
⚙️ FEATURE-#22: Simplify lambda-scheduled handler to just call main()
FernandoCelmer Apr 14, 2026
d8d26dd
⚙️ FEATURE-#22: Simplify lambda-s3-trigger handler to just call main()
FernandoCelmer Apr 14, 2026
012f4ca
⚙️ FEATURE-#22: Simplify lambda-sqs-trigger handler to just call main()
FernandoCelmer Apr 14, 2026
b66b879
⚙️ FEATURE-#22: Simplify lambda-api-trigger handler to just call main()
FernandoCelmer Apr 14, 2026
f19d9d9
⚙️ FEATURE-#22: Simplify alibaba-fc handler to just call main()
FernandoCelmer Apr 14, 2026
85a662b
⚙️ FEATURE-#22: Simplify alibaba-fc-scheduled handler to just call ma…
FernandoCelmer Apr 14, 2026
c04162d
⚙️ FEATURE-#22: Add dotflow-cloud platform README
FernandoCelmer Apr 14, 2026
9debe42
⚙️ FEATURE-#22: Register dotflow-cloud platform in cloud registry
FernandoCelmer Apr 14, 2026
2170521
📘 DOCS-#22: Update docker README to reference new CMD
FernandoCelmer Apr 14, 2026
8d09d7c
📘 DOCS-#22: Update cloud-run README to reference new CMD
FernandoCelmer Apr 14, 2026
eaff7e4
📘 DOCS-#22: Update cloud-run-scheduled README to reference new CMD
FernandoCelmer Apr 14, 2026
b303694
📘 DOCS-#22: Update ecs README to reference new CMD
FernandoCelmer Apr 14, 2026
3a02658
📘 DOCS-#22: Update ecs-scheduled README to reference new CMD
FernandoCelmer Apr 14, 2026
e57f5da
📘 DOCS-#22: Update kubernetes README to reference new CMD
FernandoCelmer Apr 14, 2026
438ec7f
📘 DOCS-#22: Update lambda README for main-internal start contract
FernandoCelmer Apr 14, 2026
9408c61
📘 DOCS-#22: Update lambda-scheduled README for main-internal start co…
FernandoCelmer Apr 14, 2026
412b02b
📘 DOCS-#22: Update lambda-s3-trigger README for main-internal start c…
FernandoCelmer Apr 14, 2026
66f8194
📘 DOCS-#22: Update lambda-sqs-trigger README for main-internal start …
FernandoCelmer Apr 14, 2026
2e034b6
📘 DOCS-#22: Update lambda-api-trigger README for main-internal start …
FernandoCelmer Apr 14, 2026
f8ddc4f
📘 DOCS-#22: Update alibaba-fc README for main-internal start contract
FernandoCelmer Apr 14, 2026
27e4efd
📘 DOCS-#22: Update alibaba-fc-scheduled README for main-internal star…
FernandoCelmer Apr 14, 2026
35ab9bc
📦 PyPI: Update dotflow to 1.0.0.dev3 in cookiecutter template
FernandoCelmer Apr 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cloud/alibaba-fc-scheduled/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The timer trigger uses **cron expressions** (China Standard Time — UTC+8):
## Important

- Do not rename `handler.py` or the `handler()` function — `s.yaml` references `handler.handler`
- Do not rename `workflow.py` or the `main()` function — `handler.py` imports it
- Do not rename `workflow.py` or the `main()` function — `handler.py` calls `main()` which starts the workflow internally
- The `s.yaml` has the function name, region, container image, and schedule pre-configured from cookiecutter
- Timer triggers use China Standard Time (CST/UTC+8) by default
- To change the schedule after deploy, edit `cronExpression` in `s.yaml` and run `s deploy` again
2 changes: 1 addition & 1 deletion cloud/alibaba-fc-scheduled/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@

def handler(event, context):
"""Invoked by Timer Trigger on a schedule."""
result = main()
main()
return {"statusCode": 200, "body": "workflow executed"}
2 changes: 1 addition & 1 deletion cloud/alibaba-fc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ s logs --tail
## Important

- Do not rename `handler.py` or the `handler()` function — `s.yaml` references `handler.handler`
- Do not rename `workflow.py` or the `main()` function — `handler.py` imports it
- Do not rename `workflow.py` or the `main()` function — `handler.py` calls `main()` which starts the workflow internally
- The `s.yaml` has the function name, region, and container image pre-configured from cookiecutter
- To add triggers (HTTP, timer, OSS, etc.), edit the `triggers` section in `s.yaml`
2 changes: 1 addition & 1 deletion cloud/alibaba-fc/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@


def handler(event, context):
result = main()
main()
return {"statusCode": 200, "body": "workflow executed"}
2 changes: 1 addition & 1 deletion cloud/azure-container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ COPY . .

RUN pip install --no-cache-dir -e .

CMD ["python", "-m", "{{MODULE_NAME}}.workflow"]
CMD ["dotflow", "start", "--workflow", "{{MODULE_NAME}}.workflow:main", "--mode", "{{EXECUTION_MODE}}"]
2 changes: 1 addition & 1 deletion cloud/cloud-run-scheduled/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ COPY . .

RUN pip install --no-cache-dir -e .

CMD ["python", "-m", "{{MODULE_NAME}}.workflow"]
CMD ["dotflow", "start", "--workflow", "{{MODULE_NAME}}.workflow:main", "--mode", "{{EXECUTION_MODE}}"]
2 changes: 1 addition & 1 deletion cloud/cloud-run-scheduled/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ gcloud logging read "resource.type=cloud_run_revision AND resource.labels.servic

## Important

- Do not rename `workflow.py` or the `main()` function — the `Dockerfile` CMD depends on it
- Do not rename `workflow.py` or the `main()` function — the `Dockerfile` runs `dotflow start --workflow <module>.workflow:main`
- The `cloudbuild.yaml` references `gcp_project_id` and `gcp_region` — these must match your GCP project
- Replace `<cloud_run_url>` with the actual URL from the `gcloud run deploy` output
- The scheduler uses OIDC authentication to invoke the Cloud Run service
2 changes: 1 addition & 1 deletion cloud/cloud-run/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ COPY . .

RUN pip install --no-cache-dir -e .

CMD ["python", "-m", "{{MODULE_NAME}}.workflow"]
CMD ["dotflow", "start", "--workflow", "{{MODULE_NAME}}.workflow:main", "--mode", "{{EXECUTION_MODE}}"]
2 changes: 1 addition & 1 deletion cloud/cloud-run/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ gcloud logging read "resource.type=cloud_run_revision AND resource.labels.servic

## Important

- Do not rename `workflow.py` or the `main()` function — the `Dockerfile` CMD depends on it
- Do not rename `workflow.py` or the `main()` function — the `Dockerfile` runs `dotflow start --workflow <module>.workflow:main`
- The `cloudbuild.yaml` references `gcp_project_id` and `gcp_region` — these must match your GCP project
- Enable all required APIs before deploying
2 changes: 1 addition & 1 deletion cloud/digital-ocean/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ COPY . .

RUN pip install --no-cache-dir -e .

CMD ["python", "-m", "{{MODULE_NAME}}.workflow"]
CMD ["dotflow", "start", "--workflow", "{{MODULE_NAME}}.workflow:main", "--mode", "{{EXECUTION_MODE}}"]
2 changes: 1 addition & 1 deletion cloud/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ COPY . .

RUN pip install --no-cache-dir -e .

CMD ["python", "-m", "{{MODULE_NAME}}.workflow"]
CMD ["dotflow", "start", "--workflow", "{{MODULE_NAME}}.workflow:main", "--mode", "{{EXECUTION_MODE}}"]
2 changes: 1 addition & 1 deletion cloud/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ docker compose up

## Important

- Do not rename the `workflow.py` module or the `main()` function — the `Dockerfile` CMD depends on it
- Do not rename `workflow.py` or the `main()` function — the `Dockerfile` runs `dotflow start --workflow <module>.workflow:main`
- The `docker-compose.yml` uses the `project_name` as container name
28 changes: 28 additions & 0 deletions cloud/dotflow-cloud/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Dotflow Cloud

Managed execution runtime for dotflow pipelines. Run your workflow on Dotflow Cloud without managing infrastructure.

## Workflow entrypoint

Your `workflow.py` must expose a `main()` factory that returns a `DotFlow` instance:

```python
from dotflow import DotFlow

def main() -> DotFlow:
workflow = DotFlow()
workflow.task.add(step=[...], initial_context=...)
return workflow
```

Dotflow Cloud runs it with the same contract used by:

```bash
dotflow start --workflow <module>.workflow:main
```

## Deploy

```bash
dotflow deploy --platform dotflow-cloud --project <project_name>
```
2 changes: 1 addition & 1 deletion cloud/ecs-scheduled/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ COPY . .

RUN pip install --no-cache-dir -e .

CMD ["python", "-m", "{{MODULE_NAME}}.workflow"]
CMD ["dotflow", "start", "--workflow", "{{MODULE_NAME}}.workflow:main", "--mode", "{{EXECUTION_MODE}}"]
2 changes: 1 addition & 1 deletion cloud/ecs-scheduled/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ aws logs get-log-events --log-group-name /ecs/<project_name> \

## Important

- Do not rename `workflow.py` or the `main()` function — the `Dockerfile` CMD depends on it
- Do not rename `workflow.py` or the `main()` function — the `Dockerfile` runs `dotflow start --workflow <module>.workflow:main`
- The schedule expression in `template.yaml` uses AWS EventBridge syntax
- Edit `aws_account_id` and `aws_region` in `template.yaml` before deploying
- The ECS task runs on Fargate and stops after the workflow completes
2 changes: 1 addition & 1 deletion cloud/ecs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ COPY . .

RUN pip install --no-cache-dir -e .

CMD ["python", "-m", "{{MODULE_NAME}}.workflow"]
CMD ["dotflow", "start", "--workflow", "{{MODULE_NAME}}.workflow:main", "--mode", "{{EXECUTION_MODE}}"]
2 changes: 1 addition & 1 deletion cloud/ecs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ aws logs get-log-events --log-group-name /ecs/<project_name> \

## Important

- Do not rename `workflow.py` or the `main()` function — the `Dockerfile` CMD depends on it
- Do not rename `workflow.py` or the `main()` function — the `Dockerfile` runs `dotflow start --workflow <module>.workflow:main`
- The `task-definition.json` references the ECR image URI, `executionRoleArn`, and CloudWatch log group — do not change these unless you also update the corresponding AWS resources
- The `aws_account_id` and `aws_region` must match your actual AWS account and region
- Create the CloudWatch log group before running the task, otherwise the container will fail to start
2 changes: 1 addition & 1 deletion cloud/fly-io/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ COPY . .

RUN pip install --no-cache-dir -e .

CMD ["python", "-m", "{{MODULE_NAME}}.workflow"]
CMD ["dotflow", "start", "--workflow", "{{MODULE_NAME}}.workflow:main", "--mode", "{{EXECUTION_MODE}}"]
2 changes: 1 addition & 1 deletion cloud/fly-io/fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ primary_region = "iad"
dockerfile = "Dockerfile"

[processes]
worker = "python -m {{MODULE_NAME}}.workflow"
worker = "dotflow start --workflow {{MODULE_NAME}}.workflow:main --mode {{EXECUTION_MODE}}"

[[vm]]
cpu_kind = "shared"
Expand Down
2 changes: 1 addition & 1 deletion cloud/github-actions/.github/workflows/dotflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:

- run: pip install -e .

- run: python -m {{MODULE_NAME}}.workflow
- run: dotflow start --workflow {{MODULE_NAME}}.workflow:main --mode {{EXECUTION_MODE}}
2 changes: 1 addition & 1 deletion cloud/heroku/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ COPY . .

RUN pip install --no-cache-dir -e .

CMD ["python", "-m", "{{MODULE_NAME}}.workflow"]
CMD ["dotflow", "start", "--workflow", "{{MODULE_NAME}}.workflow:main", "--mode", "{{EXECUTION_MODE}}"]
2 changes: 1 addition & 1 deletion cloud/heroku/Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
worker: python -m {{MODULE_NAME}}.workflow
worker: dotflow start --workflow {{MODULE_NAME}}.workflow:main --mode {{EXECUTION_MODE}}
9 changes: 6 additions & 3 deletions cloud/heroku/heroku.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ build:
run:
worker:
command:
- python
- -m
- {{MODULE_NAME}}.workflow
- dotflow
- start
- --workflow
- {{MODULE_NAME}}.workflow:main
- --mode
- {{EXECUTION_MODE}}
2 changes: 1 addition & 1 deletion cloud/kubernetes/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ COPY . .

RUN pip install --no-cache-dir -e .

CMD ["python", "-m", "{{MODULE_NAME}}.workflow"]
CMD ["dotflow", "start", "--workflow", "{{MODULE_NAME}}.workflow:main", "--mode", "{{EXECUTION_MODE}}"]
2 changes: 1 addition & 1 deletion cloud/kubernetes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ kubectl apply -f service.yaml

## Important

- Do not rename `workflow.py` or the `main()` function — the `Dockerfile` CMD depends on it
- Do not rename `workflow.py` or the `main()` function — the `Dockerfile` runs `dotflow start --workflow <module>.workflow:main`
- The `deployment.yaml` uses `imagePullPolicy: Never` by default — this only works with locally built images (minikube). For production, change to `Always` and use a container registry
- Project names with `_` are automatically converted to `-` in Kubernetes resource names (RFC 1123 compliance)
2 changes: 1 addition & 1 deletion cloud/lambda-api-trigger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ sam logs --stack-name <project_name> --tail
## Important

- Do not rename `handler.py` or the `handler()` function — the `Dockerfile` CMD is `handler.handler`
- Do not rename `workflow.py` or the `main()` function — `handler.py` imports it
- Do not rename `workflow.py` or the `main()` function — `handler.py` calls `main()` which starts the workflow internally
- The API Gateway URL is shown in the CloudFormation outputs after deploy
- The `samconfig.toml` has stack name, region, and ECR repository pre-configured
2 changes: 1 addition & 1 deletion cloud/lambda-api-trigger/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ def handler(event, context):
body = json.loads(event.get("body") or "{}")
print(f"Received payload: {body}")

result = main()
main()
return {"statusCode": 200, "body": json.dumps({"status": "workflow executed"})}
2 changes: 1 addition & 1 deletion cloud/lambda-s3-trigger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ sam logs --stack-name <project_name> --tail
## Important

- Do not rename `handler.py` or the `handler()` function — the `Dockerfile` CMD is `handler.handler`
- Do not rename `workflow.py` or the `main()` function — `handler.py` imports it
- Do not rename `workflow.py` or the `main()` function — `handler.py` calls `main()` which starts the workflow internally
- Edit the S3 bucket name and prefix in `template.yaml` before deploying
- The `samconfig.toml` has stack name, region, and ECR repository pre-configured
2 changes: 1 addition & 1 deletion cloud/lambda-s3-trigger/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@

def handler(event, context):
"""Invoked by S3 file upload."""
result = main()
main()
return {"statusCode": 200, "body": "workflow executed"}
2 changes: 1 addition & 1 deletion cloud/lambda-scheduled/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ sam logs --stack-name <project_name> --tail
## Important

- Do not rename `handler.py` or the `handler()` function — the `Dockerfile` CMD is `handler.handler`
- Do not rename `workflow.py` or the `main()` function — `handler.py` imports it
- Do not rename `workflow.py` or the `main()` function — `handler.py` calls `main()` which starts the workflow internally
- The schedule expression in `template.yaml` uses AWS EventBridge syntax (e.g. `rate(6 hours)`, `cron(0 12 * * ? *)`)
- The `samconfig.toml` has stack name, region, and ECR repository pre-configured
2 changes: 1 addition & 1 deletion cloud/lambda-scheduled/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@

def handler(event, context):
"""Invoked by EventBridge on a schedule."""
result = main()
main()
return {"statusCode": 200, "body": "workflow executed"}
2 changes: 1 addition & 1 deletion cloud/lambda-sqs-trigger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ sam logs --stack-name <project_name> --tail
## Important

- Do not rename `handler.py` or the `handler()` function — the `Dockerfile` CMD is `handler.handler`
- Do not rename `workflow.py` or the `main()` function — `handler.py` imports it
- Do not rename `workflow.py` or the `main()` function — `handler.py` calls `main()` which starts the workflow internally
- The SQS queue is created by the SAM template — check `template.yaml` for queue configuration
- The `samconfig.toml` has stack name, region, and ECR repository pre-configured
2 changes: 1 addition & 1 deletion cloud/lambda-sqs-trigger/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ def handler(event, context):
body = json.loads(record.get("body", "{}"))
print(f"Received message: {body}")

result = main()
main()
return {"statusCode": 200, "body": "workflow executed"}
2 changes: 1 addition & 1 deletion cloud/lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ sam logs --stack-name <project_name> --tail
## Important

- Do not rename `handler.py` or the `handler()` function — the `Dockerfile` CMD is `handler.handler`
- Do not rename `workflow.py` or the `main()` function — `handler.py` imports it
- Do not rename `workflow.py` or the `main()` function — `handler.py` calls `main()` which starts the workflow internally
- The `samconfig.toml` has the stack name, region, and ECR repository pre-configured from cookiecutter
- To change the schedule or add triggers, edit `template.yaml` (see `lambda-scheduled` template)
2 changes: 1 addition & 1 deletion cloud/lambda/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@


def handler(event, context):
result = main()
main()
return {"statusCode": 200, "body": "workflow executed"}
2 changes: 1 addition & 1 deletion cloud/railway/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ COPY . .

RUN pip install --no-cache-dir -e .

CMD ["python", "-m", "{{MODULE_NAME}}.workflow"]
CMD ["dotflow", "start", "--workflow", "{{MODULE_NAME}}.workflow:main", "--mode", "{{EXECUTION_MODE}}"]
2 changes: 1 addition & 1 deletion cloud/railway/railway.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dockerfilePath": "Dockerfile"
},
"deploy": {
"startCommand": "python -m {{MODULE_NAME}}.workflow",
"startCommand": "dotflow start --workflow {{MODULE_NAME}}.workflow:main --mode {{EXECUTION_MODE}}",
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 3
}
Expand Down
5 changes: 5 additions & 0 deletions cloud/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"description": "Dockerfile and docker-compose for local or any container runtime",
"files": ["Dockerfile", "docker-compose.yml", "README.md"]
},
"dotflow-cloud": {
"name": "Dotflow Cloud",
"description": "Managed dotflow runtime with workflow factory entrypoint (dotflow start --workflow)",
"files": ["README.md"]
},
"lambda": {
"name": "AWS Lambda",
"description": "Dockerfile, handler.py, and SAM template for AWS Lambda",
Expand Down
2 changes: 1 addition & 1 deletion cloud/render/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ COPY . .

RUN pip install --no-cache-dir -e .

CMD ["python", "-m", "{{MODULE_NAME}}.workflow"]
CMD ["dotflow", "start", "--workflow", "{{MODULE_NAME}}.workflow:main", "--mode", "{{EXECUTION_MODE}}"]
2 changes: 1 addition & 1 deletion cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"execution_mode": ["sequential", "parallel", "background"],
"retry": ["no", "yes"],
"checkpoint": ["no", "yes"],
"cloud": ["none", "docker", "lambda", "lambda-scheduled", "lambda-s3-trigger", "lambda-sqs-trigger", "lambda-api-trigger", "ecs", "ecs-scheduled", "cloud-run", "cloud-run-scheduled", "kubernetes", "github-actions", "alibaba-fc", "alibaba-fc-scheduled"]
"cloud": ["none", "dotflow-cloud", "docker", "lambda", "lambda-scheduled", "lambda-s3-trigger", "lambda-sqs-trigger", "lambda-api-trigger", "ecs", "ecs-scheduled", "cloud-run", "cloud-run-scheduled", "kubernetes", "github-actions", "alibaba-fc", "alibaba-fc-scheduled"]
}
2 changes: 2 additions & 0 deletions hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
CLOUD = "{{ cookiecutter.cloud }}"
PROJECT_NAME = "{{ cookiecutter.project_name }}"
MODULE_NAME = "{{ cookiecutter.module_name }}"
EXECUTION_MODE = "{{ cookiecutter.execution_mode }}"

BOLD = "\033[1m"
CYAN = "\033[36m"
Expand All @@ -33,6 +34,7 @@ def ask_inputs() -> dict:
"MODULE_NAME": MODULE_NAME,
"STACK_NAME": sanitized_name,
"K8S_NAME": sanitized_name,
"EXECUTION_MODE": EXECUTION_MODE,
}

if CLOUD in {
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_name}}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A workflow built with [dotflow](https://github.com/dotflow-io/dotflow).

```bash
pip install -e ".[dev]"
python -m {{ cookiecutter.module_name }}.workflow
dotflow start --workflow {{ cookiecutter.module_name }}.workflow:main --mode {{ cookiecutter.execution_mode }}
```

## Running Tests
Expand Down
14 changes: 8 additions & 6 deletions {{cookiecutter.project_name}}/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{%- set scheduled_clouds = ["dotflow-cloud", "lambda-scheduled", "ecs-scheduled", "cloud-run-scheduled", "alibaba-fc-scheduled", "github-actions"] -%}
{%- set scheduler = "none" if cookiecutter.cloud in scheduled_clouds else cookiecutter.scheduler -%}
[project]
name = "{{ cookiecutter.project_name }}"
version = "0.1.0"
description = ""
requires-python = ">=3.9"
dependencies = [
{% if cookiecutter.storage == "s3" and cookiecutter.scheduler == "cron" %} "dotflow==0.15.0.dev7[aws,scheduler]",
{% elif cookiecutter.storage == "gcs" and cookiecutter.scheduler == "cron" %} "dotflow==0.15.0.dev7[gcp,scheduler]",
{% elif cookiecutter.storage == "s3" %} "dotflow==0.15.0.dev7[aws]",
{% elif cookiecutter.storage == "gcs" %} "dotflow==0.15.0.dev7[gcp]",
{% elif cookiecutter.scheduler == "cron" %} "dotflow==0.15.0.dev7[scheduler]",
{% else %} "dotflow==0.15.0.dev7",
{% if cookiecutter.storage == "s3" and scheduler == "cron" %} "dotflow==1.0.0.dev3[aws,scheduler]",
{% elif cookiecutter.storage == "gcs" and scheduler == "cron" %} "dotflow==1.0.0.dev3[gcp,scheduler]",
{% elif cookiecutter.storage == "s3" %} "dotflow==1.0.0.dev3[aws]",
{% elif cookiecutter.storage == "gcs" %} "dotflow==1.0.0.dev3[gcp]",
{% elif scheduler == "cron" %} "dotflow==1.0.0.dev3[scheduler]",
{% else %} "dotflow==1.0.0.dev3",
{% endif %}]

[project.optional-dependencies]
Expand Down
Loading