diff --git a/apps/roles/role_init/templates/init.sh.jinja2 b/apps/roles/role_init/templates/init.sh.jinja2 index d96cd085..0ea9e4cb 100644 --- a/apps/roles/role_init/templates/init.sh.jinja2 +++ b/apps/roles/role_init/templates/init.sh.jinja2 @@ -25,7 +25,10 @@ else fi fi -# change all the variables to real value,such as DB_MYSQL_PASSWORD=$APP_PASSWORD=>DB_MYSQL_PASSWORD=ues983ks9309023! TODO +# change all the variables to real value,such as DB_MYSQL_PASSWORD=$APP_PASSWORD=>DB_MYSQL_PASSWORD=ues983ks9309023! +source /data/apps/{{app_name}}/.env +envsubst < .env > /tmp/env +cat /tmp/env > /data/apps/{{app_name}}/.env # init APP_URL app_url_replace=$(cat /data/apps/{{app_name}}/.env |grep APP_URL_REPLACE)