Use env instead of env.local

This commit is contained in:
Jon Staab
2025-05-12 08:27:46 -07:00
parent 52ef67740a
commit 317ab57ed2
6 changed files with 9 additions and 9 deletions

2
.gitignore vendored
View File

@@ -1,5 +1,5 @@
# Env
.env.local
.env
# Vite
vite.config.js.timestamp-*

View File

@@ -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

View File

@@ -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

View File

@@ -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({

View File

@@ -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} */

View File

@@ -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({