From 0e2c4469b3b2776d7efeb03823e8aff4e5e0eb27 Mon Sep 17 00:00:00 2001 From: tobinio Date: Thu, 11 Jun 2026 08:53:15 +0200 Subject: [PATCH] move taskline to compose file --- .../homeserver/services/taskline.compose.yml | 19 +++++ hosts/homeserver/services/taskline.nix | 73 ++++--------------- 2 files changed, 34 insertions(+), 58 deletions(-) create mode 100644 hosts/homeserver/services/taskline.compose.yml diff --git a/hosts/homeserver/services/taskline.compose.yml b/hosts/homeserver/services/taskline.compose.yml new file mode 100644 index 0000000..9bb9d14 --- /dev/null +++ b/hosts/homeserver/services/taskline.compose.yml @@ -0,0 +1,19 @@ +services: + nuxt: + image: atcr.io/tobinio.dev/task-line/nuxt:v2.4.0 + restart: always + ports: + - "3003:3000" + env_file: + - /run/secrets/rendered/taskline.nuxt.env + volumes: + - /srv/apps/taskline/data:/app/.data + api: + image: atcr.io/tobinio.dev/task-line/api:v2.4.0 + restart: always + ports: + - "3001:8080" + env_file: + - /run/secrets/rendered/taskline.api.env + volumes: + - /srv/apps/taskline/data:/app/.data diff --git a/hosts/homeserver/services/taskline.nix b/hosts/homeserver/services/taskline.nix index 0eda593..aa07e9d 100644 --- a/hosts/homeserver/services/taskline.nix +++ b/hosts/homeserver/services/taskline.nix @@ -17,69 +17,26 @@ }; sops.templates."taskline.nuxt.env".content = '' - NUXT_GOOGLE_CLIENT_ID=${config.sops.placeholder.nuxt_google_client_id} - NUXT_GOOGLE_CLIENT_SECRET=${config.sops.placeholder.nuxt_google_client_secret} + NUXT_GOOGLE_CLIENT_ID=${config.sops.placeholder.nuxt_google_client_id} + NUXT_GOOGLE_CLIENT_SECRET=${config.sops.placeholder.nuxt_google_client_secret} - NUXT_UPSTASH_URL=${config.sops.placeholder.nuxt_upstash_url} - NUXT_UPSTASH_TOKEN=${config.sops.placeholder.nuxt_upstash_token} + NUXT_UPSTASH_URL=${config.sops.placeholder.nuxt_upstash_url} + NUXT_UPSTASH_TOKEN=${config.sops.placeholder.nuxt_upstash_token} - BETTER_AUTH_SECRET=${config.sops.placeholder.better_auth_secret} - BETTER_AUTH_URL=${config.sops.placeholder.better_auth_url} + BETTER_AUTH_SECRET=${config.sops.placeholder.better_auth_secret} + BETTER_AUTH_URL=${config.sops.placeholder.better_auth_url} - NUXT_PUBLIC_WEBPUSH_PUBLIC_KEY=${config.sops.placeholder.nuxt_public_webpush_public_key} + NUXT_PUBLIC_WEBPUSH_PUBLIC_KEY=${config.sops.placeholder.nuxt_public_webpush_public_key} - NUXT_PUBLIC_API_BASE=${config.sops.placeholder.nuxt_public_api_base} - ''; + NUXT_PUBLIC_API_BASE=${config.sops.placeholder.nuxt_public_api_base} + ''; - sops.templates."taskline.api.env".content = '' - API_WEBPUSH_PRIVATE_KEY=${config.sops.placeholder.api_webpush_private_key} + sops.templates."taskline.api.env".content = '' + API_WEBPUSH_PRIVATE_KEY=${config.sops.placeholder.api_webpush_private_key} - API_AUTH_API_BASE=${config.sops.placeholder.api_auth_api_base} - API_SELF_API_BASE=${config.sops.placeholder.api_self_api_base} + API_AUTH_API_BASE=${config.sops.placeholder.api_auth_api_base} + API_SELF_API_BASE=${config.sops.placeholder.api_self_api_base} - API_DATABASE_URL=${config.sops.placeholder.api_database_url} - ''; - - - virtualisation.oci-containers = { - backend = "docker"; - - containers = { - nuxt = { - image = "atcr.io/tobinio.dev/task-line/nuxt:v2.4.0"; - - ports = [ - "3003:3000" - ]; - - environmentFiles = [ - config.sops.templates."taskline.nuxt.env".path - ]; - - volumes = [ - "/srv/apps/taskline/data:/app/.data" - ]; - - autoStart = true; - }; - - api = { - image = "atcr.io/tobinio.dev/task-line/api:v2.4.0"; - - ports = [ - "3001:8080" - ]; - - environmentFiles = [ - config.sops.templates."taskline.api.env".path - ]; - - volumes = [ - "/srv/apps/taskline/data:/app/.data" - ]; - - autoStart = true; - }; - }; - }; + API_DATABASE_URL=${config.sops.placeholder.api_database_url} + ''; } -- 2.51.2