From 8afe615f565175070d4b1a3325d51b3c9b53db7a Mon Sep 17 00:00:00 2001 From: not-nullptr <62841684+not-nullptr@users.noreply.github.com> Date: Sun, 13 Apr 2025 23:43:52 +0100 Subject: [PATCH] fix: use PUB_VERTD_URL --- .env.example | 3 ++- Dockerfile | 2 ++ docker-compose.yml | 2 ++ src/lib/sections/settings/index.svelte.ts | 3 ++- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 500a46c..69d992c 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,4 @@ PUB_HOSTNAME=localhost:5173 # only gets used for plausible (for now) PUB_PLAUSIBLE_URL=https://plausible.example.com # can be empty -PUB_ENV=development # "production", "development", or "nightly" \ No newline at end of file +PUB_ENV=development # "production", "development", or "nightly" +PUB_VERTD_URL=https://vertd.vert.sh # default vertd instance \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 48aed31..d15dfdb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,10 +5,12 @@ WORKDIR /app ARG PUB_ENV ARG PUB_HOSTNAME ARG PUB_PLAUSIBLE_URL +ARG PUB_VERTD_URL ENV PUB_ENV=${PUB_ENV} ENV PUB_HOSTNAME=${PUB_HOSTNAME} ENV PUB_PLAUSIBLE_URL=${PUB_PLAUSIBLE_URL} +ENV PUB_VERTD_URL=${PUB_VERTD_URL} COPY package.json ./ diff --git a/docker-compose.yml b/docker-compose.yml index 8bbb17a..ce2c8b6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,12 +7,14 @@ services: - PUB_PLAUSIBLE_URL=${PUB_PLAUSIBLE_URL:-https://plausible.example.com} - PUB_ENV=${PUB_ENV:-production} - PORT=${PORT:-3000} + - PUB_VERTD_URL=${PUB_VERTD_URL:-https://vertd.vert.sh} build: context: . args: PUB_HOSTNAME: ${PUB_HOSTNAME:-vert.sh} PUB_PLAUSIBLE_URL: ${PUB_PLAUSIBLE_URL:-https://plausible.example.com} PUB_ENV: ${PUB_ENV:-production} + PUB_VERTD_URL: ${PUB_VERTD_URL:-https://vertd.vert.sh} restart: unless-stopped ports: - ${PORT:-3000}:80 diff --git a/src/lib/sections/settings/index.svelte.ts b/src/lib/sections/settings/index.svelte.ts index 6c7a933..a53b844 100644 --- a/src/lib/sections/settings/index.svelte.ts +++ b/src/lib/sections/settings/index.svelte.ts @@ -1,3 +1,4 @@ +import { PUB_VERTD_URL } from "$env/static/public"; import type { ConversionSpeed } from "$lib/converters/vertd.svelte"; export { default as Appearance } from "./Appearance.svelte"; @@ -18,7 +19,7 @@ export class Settings { public settings: ISettings = $state({ filenameFormat: "VERT_%name%", plausible: true, - vertdURL: "https://vertd.vert.sh", + vertdURL: PUB_VERTD_URL, vertdSpeed: "slow", });