Initial setup, cleanup, VPS setup
All checks were successful
Deploy to VPS / deploy (push) Successful in 52s
All checks were successful
Deploy to VPS / deploy (push) Successful in 52s
This commit is contained in:
28
scripts/create-secret-file.sh
Normal file
28
scripts/create-secret-file.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Create secret file from environment variables for testing ConfigLoader
|
||||
# This simulates the mounted secret file approach used in Inferno
|
||||
|
||||
SECRET_FILE="/run/secrets/honey-config.properties"
|
||||
SECRET_DIR="/run/secrets"
|
||||
|
||||
# Create directory if it doesn't exist
|
||||
mkdir -p "$SECRET_DIR"
|
||||
|
||||
# Create properties file from environment variables
|
||||
cat > "$SECRET_FILE" << EOF
|
||||
# Configuration loaded from secret file (created from env vars for testing)
|
||||
SPRING_DATASOURCE_URL=${SPRING_DATASOURCE_URL}
|
||||
SPRING_DATASOURCE_USERNAME=${SPRING_DATASOURCE_USERNAME}
|
||||
SPRING_DATASOURCE_PASSWORD=${SPRING_DATASOURCE_PASSWORD}
|
||||
TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN}
|
||||
FRONTEND_URL=${FRONTEND_URL}
|
||||
PORT=${PORT}
|
||||
EOF
|
||||
|
||||
# Set permissions (readable by the application user)
|
||||
chmod 644 "$SECRET_FILE"
|
||||
|
||||
echo "✅ Secret file created at $SECRET_FILE from environment variables"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user