replace .env.development[production].local with .env.development[production];add env example

This commit is contained in:
david_bai
2025-06-30 20:45:06 +08:00
parent ba0a73fb1b
commit d2e93073f8
15 changed files with 57 additions and 30 deletions
+6
View File
@@ -0,0 +1,6 @@
BACKEND_PORT=3001
REDIS_HOST='localhost'
REDIS_PORT=6379
CORS_ORIGIN=http://localhost:3002
+18
View File
@@ -0,0 +1,18 @@
BACKEND_PORT=3001
REDIS_HOST='localhost'
REDIS_PORT=6379
CORS_ORIGIN=https://www.privydrop.app
# TURN Server Configuration
TURN_EXTERNAL_IP=43.153.3.146
TURN_REALM=turn.privydrop.app
TURN_USERNAME=[Username]
TURN_PASSWORD=[Password]
TURN_CERT_PATH=/etc/letsencrypt/live/privydrop.app/fullchain.pem
TURN_KEY_PATH=/etc/letsencrypt/live/privydrop.app/privkey.pem
# Nginx Configuration
NGINX_SERVER_NAME=privydrop.app
NGINX_FRONTEND_ROOT=[path/to/your/PrivyDrop/frontend]
+1 -1
View File
@@ -33,7 +33,7 @@ This is the backend server for PrivyDrop. It is built with Node.js, Express, and
```
3. **Configure Environment Variables**
Create a `.env.development.local` file in the `backend/` directory and populate it with the following variables:
Create a `.env.development` file in the `backend/` directory and populate it with the following variables:
```ini
# Server Configuration
+1 -1
View File
@@ -33,7 +33,7 @@
```
3. **配置环境变量**
在 `backend/` 目录中创建一个 `.env.development.local` 文件,并填充以下变量:
在 `backend/` 目录中创建一个 `.env.development` 文件,并填充以下变量:
```ini
# 服务器配置
+1 -1
View File
@@ -39,6 +39,6 @@ for CERT_PATH in "$CERTBOT_DIR"/*/fullchain.pem; do
echo "Failed to renew certificate for $DOMAIN"
fi
# Start nginx
sudo bash configure.sh ../../.env.production.local
sudo bash configure.sh ../../.env.production
fi
done
+2 -2
View File
@@ -16,8 +16,8 @@ interface AppConfig {
dotenv.config({
path:
process.env.NODE_ENV === "production"
? path.resolve(process.cwd(), ".env.production.local")
: path.resolve(process.cwd(), ".env.development.local"),
? path.resolve(process.cwd(), ".env.production")
: path.resolve(process.cwd(), ".env.development"),
});
// Check for necessary Redis environment variables
if (!process.env.REDIS_HOST) {