diff --git a/scripts/install b/scripts/install index 5f69fa8..1bcaec2 100644 --- a/scripts/install +++ b/scripts/install @@ -140,22 +140,11 @@ mkdir -p "$datadir" # Give permission to the datadir chown -R "$app":"$app" "$datadir" -#================================================= -# BUILD YARN DEPENDENCIES -#================================================= - -cp ../conf/production.yaml "$final_path/config/production.yaml" -touch "$final_path/config/local-production.json" - -( - cd "$final_path" - yarn install --production --pure-lockfile -) - #================================================= # MODIFY A CONFIG FILE #================================================= +cp ../conf/production.yaml "$final_path/config/production.yaml" ynh_replace_string "__domain__" "$domain" "$final_path/config/production.yaml" ynh_replace_string "__db_name__" "$app" "$final_path/config/production.yaml" ynh_replace_string "__app__" "$app" "$final_path/config/production.yaml" @@ -170,6 +159,18 @@ ynh_replace_string "__PORT__" "$port" "$final_path/config/production.y # Calculate and store the config file checksum into the app settings ynh_store_file_checksum "$final_path/config/production.yaml" +#================================================= +# BUILD YARN DEPENDENCIES +#================================================= + + +touch "$final_path/config/local-production.json" + +( + cd "$final_path" + yarn install --production --pure-lockfile +) + #================================================= # SETUP SYSTEMD #=================================================