mirror of
https://github.com/czhu12/canine.git
synced 2026-01-31 00:19:18 -06:00
remove secret key base
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
x-shared-env: &shared-env
|
||||
DATABASE_URL: postgres://postgres:password@postgres:5432
|
||||
BOOT_MODE: local
|
||||
SECRET_KEY_BASE: a38fcb39d60f9d146d2a0053a25024b9
|
||||
SECRET_KEY_BASE: ${SECRET_KEY_BASE:?SECRET_KEY_BASE is required}
|
||||
APP_HOST: http://localhost:${PORT:-3000}
|
||||
LOCAL_MODE_PASSWORDLESS: true
|
||||
ALLOWED_HOSTNAME: "*"
|
||||
|
||||
@@ -94,6 +94,16 @@ if [ -t 0 ]; then # Only prompt if running in interactive terminal
|
||||
port=${port:-3456}
|
||||
fi
|
||||
|
||||
echo -n "Generating secrets..."
|
||||
# Generate SECRET_KEY_BASE if not already set in .env
|
||||
if [ -f .env ] && grep -q "^SECRET_KEY_BASE=" .env; then
|
||||
echo " [OK] (using existing)"
|
||||
else
|
||||
SECRET_KEY_BASE=$(openssl rand -hex 64)
|
||||
echo "SECRET_KEY_BASE=$SECRET_KEY_BASE" >> .env
|
||||
echo " [OK]"
|
||||
fi
|
||||
|
||||
echo "Pulling latest Docker images..."
|
||||
|
||||
# Pull latest images and start docker compose
|
||||
|
||||
Reference in New Issue
Block a user