Update init.sh.jinja2

This commit is contained in:
qiaofeng1227 2022-07-13 10:47:31 +08:00 committed by GitHub
parent e2c1e54b39
commit ea5e07057a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,10 +20,11 @@ fi
# change all the variables to real value,such as DB_MYSQL_PASSWORD=$APP_PASSWORD=>DB_MYSQL_PASSWORD=ues983ks9309023! # change all the variables to real value,such as DB_MYSQL_PASSWORD=$APP_PASSWORD=>DB_MYSQL_PASSWORD=ues983ks9309023!
cd /data/apps/{{app_name}} cd /data/apps/{{app_name}}
source .env cp .env temp
envsubst < .env > temp source temp
cat temp > .env envsubst < temp > temp2
rm -f temp cat temp2 > .env
cat .env |grep 'DB_\|APP_' > /credentials/password.txt
# init APP_URL # init APP_URL
app_url_replace=$(cat /data/apps/{{app_name}}/.env |grep APP_URL_REPLACE) app_url_replace=$(cat /data/apps/{{app_name}}/.env |grep APP_URL_REPLACE)