From 6713733ec14d7a2e81154cdf1758ac5d0e9b503f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jainil=20Prajapati=20=F0=9F=AA=90?= <86187588+enough-jainil@users.noreply.github.com> Date: Sat, 2 Aug 2025 11:46:54 +0530 Subject: [PATCH] Refactor Blinko blueprint configuration and environment handling (#255) * Refactor Blinko blueprint configuration and environment handling * Standardize tag formatting in meta.json * FIX-Validating meta.json against blueprint folders and logos --------- Co-authored-by: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> --- blueprints/blinko/docker-compose.yml | 23 +++++++---------------- blueprints/blinko/template.toml | 20 ++++++++++---------- blueprints/blinko/template.yml | 20 -------------------- 3 files changed, 17 insertions(+), 46 deletions(-) delete mode 100644 blueprints/blinko/template.yml diff --git a/blueprints/blinko/docker-compose.yml b/blueprints/blinko/docker-compose.yml index 01d46fdc..13126ff5 100644 --- a/blueprints/blinko/docker-compose.yml +++ b/blueprints/blinko/docker-compose.yml @@ -1,15 +1,13 @@ -version: "3.8" - services: blinko-website: image: blinkospace/blinko:latest - container_name: blinko-website environment: NODE_ENV: production - NEXTAUTH_SECRET: ${nextauth_secret} - DATABASE_URL: postgresql://postgres:${postgres_password}@blinko-postgres:5432/postgres - NEXTAUTH_URL: ${nextauth_url} - NEXT_PUBLIC_BASE_URL: ${next_public_base_url} + # API Key for NextAuth + NEXTAUTH_SECRET: ${NEXTAUTH_SECRET} + DATABASE_URL: ${DATABASE_URL} + NEXTAUTH_URL: ${NEXTAUTH_URL} + NEXT_PUBLIC_BASE_URL: ${NEXT_PUBLIC_BASE_URL} depends_on: blinko-postgres: condition: service_healthy @@ -19,22 +17,15 @@ services: max-size: "10m" max-file: "3" ports: - - 1111:1111 - healthcheck: - test: ["CMD", "curl", "-f", "http://blinko-website:1111/"] - interval: 30s - timeout: 10s - retries: 5 - start_period: 30s + - 1111 blinko-postgres: image: postgres:14 - container_name: blinko-postgres restart: always environment: POSTGRES_DB: postgres POSTGRES_USER: postgres - POSTGRES_PASSWORD: ${postgres_password} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} TZ: Asia/Shanghai volumes: - blinko-db:/var/lib/postgresql/data diff --git a/blueprints/blinko/template.toml b/blueprints/blinko/template.toml index 127e39b8..c8da2cb8 100644 --- a/blueprints/blinko/template.toml +++ b/blueprints/blinko/template.toml @@ -1,20 +1,20 @@ [variables] main_domain = "${domain}" -postgres_password = "${password:16}" +postgres_password = "${password:32}" nextauth_secret = "${password:32}" +database_url = "postgresql://postgres:${postgres_password}@blinko-postgres:5432/postgres" nextauth_url = "http://${main_domain}" next_public_base_url = "http://${main_domain}" [config] -env = [ - "nextauth_secret=${nextauth_secret}", - "postgres_password=${postgres_password}", - "nextauth_url=${nextauth_url}", - "next_public_base_url=${next_public_base_url}", -] -mounts = [] - [[config.domains]] serviceName = "blinko-website" -port = 1_111 +port = 1111 host = "${main_domain}" + +[config.env] +NEXTAUTH_SECRET = "${nextauth_secret}" +POSTGRES_PASSWORD = "${postgres_password}" +DATABASE_URL = "${database_url}" +NEXTAUTH_URL = "${nextauth_url}" +NEXT_PUBLIC_BASE_URL = "${next_public_base_url}" \ No newline at end of file diff --git a/blueprints/blinko/template.yml b/blueprints/blinko/template.yml deleted file mode 100644 index 10e684f6..00000000 --- a/blueprints/blinko/template.yml +++ /dev/null @@ -1,20 +0,0 @@ -variables: - main_domain: ${domain} - postgres_password: ${password:16} - nextauth_secret: ${password:32} - nextauth_url: http://${main_domain} - next_public_base_url: http://${main_domain} - -config: - domains: - - serviceName: blinko-website - port: 1111 - host: ${main_domain} - - env: - - nextauth_secret=${nextauth_secret} - - postgres_password=${postgres_password} - - nextauth_url=${nextauth_url} - - next_public_base_url=${next_public_base_url} - - mounts: []