diff --git a/.dockerignore b/.dockerignore index ae84fa66..41d64b8e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -9,4 +9,4 @@ build # Env files (keep .env for build; exclude local overrides) .env.local -.env.*.local \ No newline at end of file +.env.*.local diff --git a/.env.template b/.env similarity index 97% rename from .env.template rename to .env index 65560988..fde2a546 100644 --- a/.env.template +++ b/.env @@ -5,7 +5,6 @@ VITE_PLATFORM_URL=https://app.flotilla.social VITE_PLATFORM_TERMS=https://flotilla.social/terms VITE_PLATFORM_PRIVACY=https://flotilla.social/privacy VITE_PLATFORM_NAME=Flotilla -# Can be a local path (e.g. static/logo.png) or a full https URL VITE_PLATFORM_LOGO=static/logo.png VITE_PLATFORM_RELAYS= VITE_PLATFORM_ACCENT="#7161FF" diff --git a/.gitignore b/.gitignore index e49b0404..99329539 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ # Env -.env .env.local +.env.*.local # Vite vite.config.js.timestamp-* diff --git a/README.md b/README.md index 3b3590d6..6092fd32 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ You can also optionally create an `.env.local` file and populate it with the fol - `VITE_PLATFORM_ACCENT` - A hex color for the app's accent color - `VITE_PLATFORM_DESCRIPTION` - A description of the app +These values **won't** be used for a built version. Instead, env variables should be provided to `build.sh` directly or to the built container. + If you're deploying a custom version of flotilla, be sure to remove the `plausible.coracle.social` script from `app.html`. This sends analytics to a server hosted by the developer. ## Development diff --git a/build.sh b/build.sh index dc48ea9d..894db8e3 100755 --- a/build.sh +++ b/build.sh @@ -2,11 +2,8 @@ temp_env=$(declare -p -x) -if [ -f .env.template ]; then - source .env.template -fi -if [ -f .env.local ]; then - source .env.local +if [ -f .env ]; then + source .env fi # Avoid overwriting env vars provided directly diff --git a/pwa-assets.config.js b/pwa-assets.config.js index 38d3c1c4..64ac8346 100644 --- a/pwa-assets.config.js +++ b/pwa-assets.config.js @@ -2,7 +2,7 @@ import dotenv from "dotenv" import {defineConfig, minimalPreset as preset} from "@vite-pwa/assets-generator/config" dotenv.config({path: ".env.local"}) -dotenv.config({path: ".env.template"}) +dotenv.config({path: ".env"}) export default defineConfig({ preset, diff --git a/tailwind.config.js b/tailwind.config.js index 9b188971..609605f7 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -3,7 +3,7 @@ import daisyui from "daisyui" import themes from "daisyui/src/theming/themes" config({path: ".env.local"}) -config({path: ".env.template"}) +config({path: ".env"}) /** @type {import('tailwindcss').Config} */ export default { diff --git a/vite.config.ts b/vite.config.ts index 72d86f22..a03a7c02 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,7 +5,7 @@ import {sveltekit} from "@sveltejs/kit/vite" import svg from "@poppanator/sveltekit-svg" config({path: ".env.local"}) -config({path: ".env.template"}) +config({path: ".env"}) export default defineConfig({ server: {