mirror of
https://github.com/MatthewL246/pretendo-docker.git
synced 2026-05-09 12:35:24 -05:00
36 lines
1.2 KiB
Bash
Executable File
36 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
echo "Setting up local environment variables..."
|
|
|
|
git_base=$(git rev-parse --show-toplevel)
|
|
cd "$git_base/environment"
|
|
|
|
rm ./*.local.env || true
|
|
|
|
# Generate an AES-256-CBC key for account server tokens
|
|
account_aes_key=$(openssl rand -hex 32)
|
|
echo "PN_ACT_CONFIG_AES_KEY=$account_aes_key" >>./account.local.env
|
|
|
|
# Generate master API keys for the account gRPC server
|
|
account_api_key_account=$(openssl rand -base64 32)
|
|
account_api_key_api=$(openssl rand -base64 32)
|
|
echo "PN_ACT_CONFIG_GRPC_MASTER_API_KEY_ACCOUNT=$account_api_key_account" >>./account.local.env
|
|
echo "PN_ACT_CONFIG_GRPC_MASTER_API_KEY_API=$account_api_key_api" >>./account.local.env
|
|
|
|
# Generate access and secret keys for MinIO
|
|
minio_access_key=$(openssl rand -base64 32)
|
|
echo "PN_ACT_CONFIG_S3_ACCESS_KEY=$minio_access_key" >>./account.local.env
|
|
echo "MINIO_ROOT_USER=$minio_access_key" >>./minio.local.env
|
|
minio_secret_key=$(openssl rand -base64 32)
|
|
echo "PN_ACT_CONFIG_S3_ACCESS_SECRET=$minio_secret_key" >>./account.local.env
|
|
echo "MINIO_ROOT_PASSWORD=$minio_secret_key" >>./minio.local.env
|
|
|
|
# Get the Wii U IP address
|
|
printf "Enter your Wii U's IP address: "
|
|
read -r wiiu_ip
|
|
echo "WIIU_IP=$wiiu_ip" >>./wiiu.local.env
|
|
|
|
echo "Successfully set up environment."
|