From 317ab57ed2e22e280cc70fd06ab8c065b2f154bc Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Mon, 12 May 2025 08:27:46 -0700 Subject: [PATCH] Use env instead of env.local --- .gitignore | 2 +- README.md | 6 +++--- build.sh | 4 ++-- pwa-assets.config.js | 2 +- tailwind.config.js | 2 +- vite.config.ts | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 5444bab..800033b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # Env -.env.local +.env # Vite vite.config.js.timestamp-* diff --git a/README.md b/README.md index c74e8fa..9fadf41 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ To run your own Flotilla, it's as simple as: ## Environment -You can also optionally create an `.env.local` file and populate it with the following environment variables (see `.env` for examples): +You can also optionally create an `.env` file and populate it with the following environment variables (see `.env` for examples): - `VITE_DEFAULT_PUBKEYS` - A comma-separated list of hex pubkeys for bootstrapping web of trust. - `VITE_PLATFORM_URL` - The url where the app will be hosted. This is only used for build-time population of meta tags. @@ -38,7 +38,7 @@ First, create an `A` record with your DNS provider pointing to the IP of your se Next install `nginx`, `git`, and `certbot`. If you're on a debian- or ubuntu-based distro, run `sudo apt-get update && sudo apt-get install nginx git certbot python3-certbot-nginx`. -Now, create a new user where your code will be stored, clone the repository, fill in your `.env.local` file, and build the app. +Now, create a new user where your code will be stored, clone the repository, fill in your `.env` file, and build the app. ```sh # Replace with your password @@ -67,7 +67,7 @@ nvm install nvm use pnpm i -# Optionally create and populate .env.local to suit your use case +# Optionally create and populate .env to suit your use case # Build the app NODE_OPTIONS=--max_old_space_size=16384 pnpm run build diff --git a/build.sh b/build.sh index 06f2c80..346853d 100755 --- a/build.sh +++ b/build.sh @@ -6,8 +6,8 @@ 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 38d3c1c..6502ddb 100644 --- a/pwa-assets.config.js +++ b/pwa-assets.config.js @@ -1,7 +1,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"}) dotenv.config({path: ".env.template"}) export default defineConfig({ diff --git a/tailwind.config.js b/tailwind.config.js index 8793e77..a1b2ac3 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -2,7 +2,7 @@ import {config} from "dotenv" import daisyui from "daisyui" import themes from "daisyui/src/theming/themes" -config({path: ".env.local"}) +config({path: ".env"}) config({path: ".env.template"}) /** @type {import('tailwindcss').Config} */ diff --git a/vite.config.ts b/vite.config.ts index d2ca227..67ca659 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,7 +4,7 @@ import {SvelteKitPWA} from "@vite-pwa/sveltekit" import {sveltekit} from "@sveltejs/kit/vite" import svg from "@poppanator/sveltekit-svg" -config({path: ".env.local"}) +config({path: ".env"}) config({path: ".env.template"}) export default defineConfig({