Update .env variable config

This commit is contained in:
Edi Septriyanto
2023-04-08 22:32:31 +07:00
parent 6cc27442ea
commit cbbcd97480
3 changed files with 5 additions and 5 deletions

View File

@@ -178,8 +178,8 @@ function init_memcached_install() {
echo "Memcached SASL auth option is enabled..."
if [[ "${DRYRUN}" != true ]]; then
MEMCACHED_USERNAME=${MEMCACHED_USERNAME:-"lempermc"}
MEMCACHED_PASSWORD=${MEMCACHED_PASSWORD:-$(openssl rand -base64 64 | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)}
export MEMCACHED_USERNAME=${MEMCACHED_USERNAME:-"lempermc"}
export MEMCACHED_PASSWORD=${MEMCACHED_PASSWORD:-$(openssl rand -base64 64 | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)}
run mkdir -p /etc/sasl2 && run touch /etc/sasl2/memcached_memcache.conf
cat > /etc/sasl2/memcached_memcache.conf <<EOL

View File

@@ -136,8 +136,8 @@ function init_mongodb_install() {
sleep 3 # Wait for MongoDB to completely started.
MONGODB_ADMIN_USER=${MONGODB_ADMIN_USER:-"lemperdb"}
MONGODB_ADMIN_PASSWORD=${MONGODB_ADMIN_PASSWORD:-"$(openssl rand -base64 64 | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)"}
export MONGODB_ADMIN_USER=${MONGODB_ADMIN_USER:-"lemperdb"}
export MONGODB_ADMIN_PASSWORD=${MONGODB_ADMIN_PASSWORD:-"$(openssl rand -base64 64 | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)"}
run mongosh admin \
--eval "\"db.createUser({'user': '${MONGODB_ADMIN_USER}', 'pwd': '${MONGODB_ADMIN_PASSWORD}', 'roles':[{'role': 'root', 'db': 'admin'}]});\""

View File

@@ -173,7 +173,7 @@ EOL
if [[ "${REDIS_REQUIRE_PASSWORD}" == true ]]; then
echo "Configure Redis requirepass password."
REDIS_PASSWORD=${REDIS_PASSWORD:-$(openssl rand -base64 64 | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)}
export REDIS_PASSWORD=${REDIS_PASSWORD:-$(openssl rand -base64 64 | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)}
# Update Redis config.
cat >> /etc/redis/redis.conf <<EOL