Update init.sh.jinja2

This commit is contained in:
qiaofeng1227 2022-07-11 15:29:11 +08:00 committed by GitHub
parent f2e4673f4e
commit 727f3b95eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,11 @@ sudo sh -c 'echo "init-password started at" $(date -d now) 1>> /tmp/init_debug.
#1 init for applist of .env
{% for app_name in applist.stdout_lines %}
sudo docker compose -f /data/apps/{{app_name}}/docker-compose.yml down -v
sudo sed -i "s/_PASSWORD=.*/_PASSWORD=$new_password/g" /data/apps/{{app_name}}/.env
sudo docker compose -f /data/apps/{{app_name}}/docker-compose.yml up -d --no-recreate
{% endfor %}
2 init for applist of special
#2 init for applist of special
sudo sh -c 'echo "init docker ended at" $(date -d now) 1>> /tmp/init_debug.txt'