Update Config local to remote name

This commit is contained in:
2025-11-18 11:00:01 +07:00
parent 9855a6c6ed
commit 6341d712ef
12 changed files with 49 additions and 49 deletions

View File

@@ -30,7 +30,7 @@ Exports OHLCV candle/price data from the `prices-bucket`.
```
**Interactive Prompts:**
- Select environment (SandboxLocal or ProductionLocal)
- Select environment (SandboxRemote or ProductionRemote)
- Select time range (7 days, 30 days, 90 days, 1 year, all data, or custom)
**Output:**
@@ -78,8 +78,8 @@ Imports prices-bucket CSV export data into any InfluxDB environment.
## Configuration
The scripts automatically read InfluxDB connection settings from:
- `src/Managing.Api/appsettings.SandboxLocal.json`
- `src/Managing.Api/appsettings.ProductionLocal.json`
- `src/Managing.Api/appsettings.SandboxRemote.json`
- `src/Managing.Api/appsettings.ProductionRemote.json`
**Required settings in appsettings files:**
```json
@@ -96,11 +96,11 @@ The scripts automatically read InfluxDB connection settings from:
```
exports/
├── SandboxLocal/
├── SandboxRemote/
│ └── 20241028_143022/
│ ├── prices-bucket_data.csv
│ └── export-metadata.txt
└── ProductionLocal/
└── ProductionRemote/
└── 20241028_160000/
├── prices-bucket_data.csv
└── export-metadata.txt
@@ -132,7 +132,7 @@ exports/
```bash
cd scripts/influxdb
./export-prices-bucket.sh
# Select: 1 (SandboxLocal)
# Select: 1 (SandboxRemote)
# Select: 5 (All data)
```
@@ -140,7 +140,7 @@ cd scripts/influxdb
```bash
cd scripts/influxdb
./export-prices-bucket.sh
# Select: 1 (SandboxLocal)
# Select: 1 (SandboxRemote)
# Select: 3 (Last 90 days)
```
@@ -150,14 +150,14 @@ cd scripts/influxdb
# Step 1: Export from sandbox
./export-prices-bucket.sh
# Select: 1 (SandboxLocal)
# Select: 1 (SandboxRemote)
# Select: 5 (All data)
# Step 2: Import to production
./import-csv-data.sh
# Select source: 1 (SandboxLocal)
# Select source: 1 (SandboxRemote)
# Select: Latest export timestamp
# Select target: 2 (ProductionLocal)
# Select target: 2 (ProductionRemote)
# Confirm: yes
```
@@ -167,7 +167,7 @@ cd scripts/influxdb
# Export current production data
./export-prices-bucket.sh
# Select: 2 (ProductionLocal)
# Select: 2 (ProductionRemote)
# Select: 5 (All data)
# If something goes wrong, restore it:
@@ -341,5 +341,5 @@ For issues or questions, refer to:
All scripts are located in: `/Users/oda/Desktop/Projects/managing-apps/scripts/influxdb/`
Configuration files:
- Sandbox: `/Users/oda/Desktop/Projects/managing-apps/src/Managing.Api/appsettings.SandboxLocal.json`
- Production: `/Users/oda/Desktop/Projects/managing-apps/src/Managing.Api/appsettings.ProductionLocal.json`
- Sandbox: `/Users/oda/Desktop/Projects/managing-apps/src/Managing.Api/appsettings.SandboxRemote.json`
- Production: `/Users/oda/Desktop/Projects/managing-apps/src/Managing.Api/appsettings.ProductionRemote.json`

View File

@@ -55,19 +55,19 @@ echo " InfluxDB Prices Data Export"
echo "======================================"
echo ""
echo "Select environment:"
echo "1) SandboxLocal"
echo "2) ProductionLocal"
echo "1) SandboxRemote"
echo "2) ProductionRemote"
echo ""
read -p "Enter your choice (1 or 2): " ENV_CHOICE
case $ENV_CHOICE in
1)
ENVIRONMENT="SandboxLocal"
APPSETTINGS_FILE="$SRC_DIR/Managing.Api/appsettings.SandboxLocal.json"
ENVIRONMENT="SandboxRemote"
APPSETTINGS_FILE="$SRC_DIR/Managing.Api/appsettings.SandboxRemote.json"
;;
2)
ENVIRONMENT="ProductionLocal"
APPSETTINGS_FILE="$SRC_DIR/Managing.Api/appsettings.ProductionLocal.json"
ENVIRONMENT="ProductionRemote"
APPSETTINGS_FILE="$SRC_DIR/Managing.Api/appsettings.ProductionRemote.json"
;;
*)
error "Invalid choice. Please run the script again and select 1 or 2."

View File

@@ -131,19 +131,19 @@ info "CSV file: $(basename "$CSV_FILE") ($CSV_SIZE)"
# Select target environment for import
echo ""
echo "Select TARGET environment for import:"
echo "1) SandboxLocal"
echo "2) ProductionLocal"
echo "1) SandboxRemote"
echo "2) ProductionRemote"
echo ""
read -p "Enter your choice (1 or 2): " TARGET_ENV_CHOICE
case $TARGET_ENV_CHOICE in
1)
TARGET_ENVIRONMENT="SandboxLocal"
APPSETTINGS_FILE="$SRC_DIR/Managing.Api/appsettings.SandboxLocal.json"
TARGET_ENVIRONMENT="SandboxRemote"
APPSETTINGS_FILE="$SRC_DIR/Managing.Api/appsettings.SandboxRemote.json"
;;
2)
TARGET_ENVIRONMENT="ProductionLocal"
APPSETTINGS_FILE="$SRC_DIR/Managing.Api/appsettings.ProductionLocal.json"
TARGET_ENVIRONMENT="ProductionRemote"
APPSETTINGS_FILE="$SRC_DIR/Managing.Api/appsettings.ProductionRemote.json"
;;
*)
error "Invalid choice. Please run the script again and select 1 or 2."