added .env.example for vite and server folders

This commit is contained in:
John Yeo
2025-06-16 16:34:48 +01:00
parent a321a357ef
commit 477d5ca254
7 changed files with 56 additions and 5 deletions

3
.gitignore vendored
View File

@@ -62,6 +62,7 @@ yarn-error.log*
# env files (can opt-in for committing if needed)
.env*
!.env.example
# vercel
.vercel
@@ -73,3 +74,5 @@ next-env.d.ts
*.rdb
packages/useautumn
shared/drizzle

View File

@@ -8,7 +8,7 @@ docker compose -f docker-compose.db.yml up --build
docker compose -f docker-compose.dev.yml down
docker volume rm main-repo_shared-node-modules main-repo_root-node-modules main-repo_vite-node-modules
docker compose -f docker-compose.dev.yml build --no-cache
docker compose -f docker-compose.dev.yml up
docker compose -f docker-compose.dev.yml up --build
# Prod
docker compose -f docker-compose.prod.yml up --build

View File

@@ -1,4 +1,5 @@
import "dotenv/config";
import { config } from "dotenv";
config({ path: "./server/.env" });
import { defineConfig } from "drizzle-kit";
export default defineConfig({
@@ -6,6 +7,6 @@ export default defineConfig({
out: "./drizzle",
schema: "./db/schema.ts",
dbCredentials: {
url: process.env.DEV_DATABASE_URL!,
url: process.env.DATABASE_URL!,
},
});

View File

@@ -15,5 +15,12 @@
"server:cron": "npm run cron:start -w server",
"server:workers": "npm run workers:start -w server",
"dev": "concurrently \"cd server && npm run dev\" \"cd vite && npm run dev\" \"redis-server\""
},
"dependencies": {
"drizzle-kit": "^0.31.1"
},
"devDependencies": {
"@types/node": "^24.0.3",
"dotenv": "^16.5.0"
}
}

25
pnpm-lock.yaml generated
View File

@@ -6,7 +6,18 @@ settings:
importers:
.: {}
.:
dependencies:
drizzle-kit:
specifier: ^0.31.1
version: 0.31.1
devDependencies:
'@types/node':
specifier: ^24.0.3
version: 24.0.3
dotenv:
specifier: ^16.5.0
version: 16.5.0
server:
dependencies:
@@ -2412,6 +2423,9 @@ packages:
'@types/node@22.15.32':
resolution: {integrity: sha512-3jigKqgSjsH6gYZv2nEsqdXfZqIFGAV36XYYjf9KGZ3PSG+IhLecqPnI310RvjutyMwifE2hhhNEklOUrvx/wA==}
'@types/node@24.0.3':
resolution: {integrity: sha512-R4I/kzCYAdRLzfiCabn9hxWfbuHS573x+r0dJMkkzThEa7pbrcDWK+9zu3e7aBOouf+rQAciqPFMnxwr0aWgKg==}
'@types/pg@8.15.4':
resolution: {integrity: sha512-I6UNVBAoYbvuWkkU3oosC8yxqH21f4/Jc4DK71JLG3dT2mdlGe1z+ep/LQGXaKaOgcvUrsQoPRqfgtMcvZiJhg==}
@@ -5299,6 +5313,9 @@ packages:
undici-types@6.21.0:
resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}
undici-types@7.8.0:
resolution: {integrity: sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==}
unist-util-is@6.0.0:
resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==}
@@ -7390,6 +7407,10 @@ snapshots:
dependencies:
undici-types: 6.21.0
'@types/node@24.0.3':
dependencies:
undici-types: 7.8.0
'@types/pg@8.15.4':
dependencies:
'@types/node': 22.15.32
@@ -10492,6 +10513,8 @@ snapshots:
undici-types@6.21.0: {}
undici-types@7.8.0: {}
unist-util-is@6.0.0:
dependencies:
'@types/unist': 3.0.3

15
server/.env.example Normal file
View File

@@ -0,0 +1,15 @@
# AUTH
BETTER_AUTH_SECRET=
BETTER_AUTH_URL=http://localhost:8080
CLIENT_URL=http://localhost:3000
# STRIPE REQUIRED
ENCRYPTION_IV=
ENCRYPTION_PASSWORD=
SERVER_URL=
# DATABASE
DATABASE_URL=
# IF using external redis
# REDIS_URL=redis://valkey:6379

2
vite/.env.example Normal file
View File

@@ -0,0 +1,2 @@
VITE_FRONTEND_URL=http://localhost:3000
VITE_BACKEND_URL=http://localhost:8080