1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/umami_ynh.git synced 2024-10-01 13:34:50 +02:00

Provision pgcrypto outside of prisma migration.

This commit is contained in:
orhtej2 2023-09-21 13:11:33 +02:00
parent f2e0577f23
commit 14b2a166ad
3 changed files with 10 additions and 1 deletions

View file

@ -51,6 +51,10 @@ ynh_add_config --template="../conf/.env" --destination="$install_dir/.env"
chmod 650 "$install_dir/.env"
chown $app:$app "$install_dir/.env"
ynh_script_progression --message="Provisioning pgcrypto..." --weight=1
ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pgcrypto;" --database="$db_name"
#=================================================
# CONFIGURE THE APP
#=================================================

View file

@ -35,6 +35,8 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
#=================================================
ynh_script_progression --message="Restoring the database..." --weight=6
ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pgcrypto;" --database="$db_name"
ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name
#=================================================

View file

@ -83,6 +83,10 @@ ynh_add_config --template="../conf/.env" --destination="$install_dir/.env"
chmod 650 "$install_dir/.env"
chown $app:$app "$install_dir/.env"
ynh_script_progression --message="Provisioning pgcrypto..." --weight=1
ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pgcrypto;" --database="$db_name"
#=================================================
# CONFIGURE THE APP
#=================================================
@ -92,7 +96,6 @@ pushd $install_dir
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NEXT_TELEMETRY_DISABLED=1 yarn build
#ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH npx @umami/migrate-v1-v2@latest
popd
#=================================================