From 316fe03be938c10a18eca582ffd9504878047b2e Mon Sep 17 00:00:00 2001 From: Rik Veenboer Date: Fri, 22 Aug 2025 09:42:19 +0200 Subject: [PATCH] add backup repo to dagster and docker files --- compose.code.yaml | 27 ++++++++++++++++++++++++++- compose.system.yaml | 2 ++ dagster.yaml | 1 + pyproject.toml | 3 +++ requirements.sh | 1 + workspace.yaml | 4 ++++ 6 files changed, 37 insertions(+), 1 deletion(-) diff --git a/compose.code.yaml b/compose.code.yaml index 9d928e1..7dd9740 100644 --- a/compose.code.yaml +++ b/compose.code.yaml @@ -64,12 +64,21 @@ services: dagster-code-stocks-playwright: build: context: apps/stocks - dockerfile: ../../Dockerfile.code.playwright + dockerfile: Dockerfile.code.playwright args: - APP=stocks image: dagster-code-stocks-playwright profiles: [ "never" ] + dagster-code-backup-base: + build: + context: apps/backup + dockerfile: ../../Dockerfile.code + args: + - APP=backup + image: dagster-code-backup-base + profiles: [ "never" ] + dagster-code-tesla: build: context: apps/tesla @@ -108,6 +117,22 @@ services: networks: - dagster + dagster-code-backup: + build: + context: apps/backup + container_name: dagster-code-backup + image: dagster-code-backup + restart: always + environment: + <<: [ *dagster_env ] + DAGSTER_CURRENT_IMAGE: dagster-code-backup + volumes: + - /opt/dagster/apps/:/code/apps/:ro + - /opt/dagster/shared/:/code/shared/:ro + - /opt/dagster/logs/:/logs:rw + networks: + - dagster + dagster-code-other: build: context: apps/other diff --git a/compose.system.yaml b/compose.system.yaml index ad441d1..810e8d8 100644 --- a/compose.system.yaml +++ b/compose.system.yaml @@ -40,6 +40,8 @@ services: <<: *postgres_env networks: - dagster + ports: + - '15432:5432' volumes: - /opt/dagster/db/:/var/lib/postgresql/data/ diff --git a/dagster.yaml b/dagster.yaml index 19ede06..fc1e4e5 100644 --- a/dagster.yaml +++ b/dagster.yaml @@ -15,6 +15,7 @@ run_launcher: class: CustomDockerRunLauncher config: env_vars: + - TZ - DAGSTER_POSTGRES_HOST - DAGSTER_POSTGRES_PORT - DAGSTER_POSTGRES_USER diff --git a/pyproject.toml b/pyproject.toml index 2ec1e8b..9300763 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,6 +65,9 @@ weather = [ "requests_cache", "retry_requests" ] +backup = [ + "paramiko" +] other = [ # "deltalake>=1.0.0", # "dagster-deltalake-pandas", diff --git a/requirements.sh b/requirements.sh index 12fe8ca..746844f 100755 --- a/requirements.sh +++ b/requirements.sh @@ -5,4 +5,5 @@ uv pip compile pyproject.toml --extra=dagster --extra=vinyl > apps/vinyl/require uv pip compile pyproject.toml --extra=dagster --extra=stocks > apps/stocks/requirements.txt uv pip compile pyproject.toml --extra=dagster --extra=tesla > apps/tesla/requirements.txt uv pip compile pyproject.toml --extra=dagster --extra=weather > apps/weather/requirements.txt +uv pip compile pyproject.toml --extra=dagster --extra=backup > apps/backup/requirements.txt uv pip compile pyproject.toml --extra=dagster --extra=other > apps/other/requirements.txt diff --git a/workspace.yaml b/workspace.yaml index 806ef61..0ca8178 100644 --- a/workspace.yaml +++ b/workspace.yaml @@ -15,6 +15,10 @@ load_from: location_name: weather host: dagster-code-weather port: 4000 + - grpc_server: + location_name: backup + host: dagster-code-backup + port: 4000 - grpc_server: location_name: other host: dagster-code-other