mirror of
https://github.com/joglomedia/LEMPer.git
synced 2026-04-03 03:08:27 +00:00
Update .env variable config
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'}]});\""
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user