From 646c758e120ef2ba39ed17bf0f78f6451635585e Mon Sep 17 00:00:00 2001 From: Peter Havekes Date: Tue, 22 Oct 2024 08:50:28 +0200 Subject: [PATCH] Change path of database script to run inside docker container --- roles/stepupwebauthn/templates/01-webauthn-db_init.sh.j2 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/roles/stepupwebauthn/templates/01-webauthn-db_init.sh.j2 b/roles/stepupwebauthn/templates/01-webauthn-db_init.sh.j2 index 8bc649e8a..f00ef5541 100644 --- a/roles/stepupwebauthn/templates/01-webauthn-db_init.sh.j2 +++ b/roles/stepupwebauthn/templates/01-webauthn-db_init.sh.j2 @@ -1,7 +1,13 @@ #!/bin/bash +# +#### To run the database init inside the docker : +# sudo docker cp /root/01-webauthn-db_init.sh webauthn:/ +# sudo docker exec -it webauthn /bin/bash /01-webauthn-db_init.sh +#### +# #overwrite database settings for deploy export DATABASE_URL=mysql://{{ database_webauthn_deploy_user }}:{{ mysql_passwords.webauthndeploy }}@{{ webauthn_db_host }}:3306/{{ database_webauthn_name }} -cd {{ current_release_symlink }} +cd /var/www/html echo "Create database if not exists" {{ php_cli }} bin/console doctrine:database:create --if-not-exists echo "Create or migrate schema"