From a2c646d04cd0bb26da6c14a6a3319bdd24e5b2ae Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 23 Dec 2021 09:08:37 +0100 Subject: [PATCH] Remove elixir --- scripts/_common.sh | 3 --- scripts/install | 32 ++++++-------------------------- 2 files changed, 6 insertions(+), 29 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 9c7a7b7..a435def 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,9 +6,6 @@ # dependencies used by the app pkg_dependencies="build-essential inotify-tools postgresql postgresql-client postgresql-contrib postgis postgresql-postgis-scripts git curl unzip gnupg openssl make gcc libc-dev argon2 imagemagick webp gifsicle jpegoptim optipng pngquant cmake" -extra_pkg_dependencies="elixir esl-erlang" - -NODEJS_VERSION=14 #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 7782765..b80fd98 100644 --- a/scripts/install +++ b/scripts/install @@ -75,18 +75,6 @@ ynh_script_progression --message="Installing dependencies..." ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies -ynh_install_nodejs --nodejs_version=$NODEJS_VERSION - -ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key='https://dl.yarnpkg.com/debian/pubkey.gpg' - -if dpkg --compare-versions $(cat /etc/debian_version) ge 11.0 -then - ynh_install_extra_app_dependencies --repo="deb http://packages.erlang-solutions.com/debian buster contrib" --package="$extra_pkg_dependencies" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' -else - lsb_name="$(lsb_release --codename --short)" - ynh_install_extra_app_dependencies --repo="deb http://packages.erlang-solutions.com/debian $lsb_name contrib" --package="$extra_pkg_dependencies" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' -fi - #================================================= # CREATE DEDICATED USER #================================================= @@ -160,22 +148,14 @@ ynh_script_progression --message="Installing dependencies and building app..." - config="$final_path/live/config/runtime.exs" -pushd $final_path/live/js - ynh_use_nodejs - ynh_script_progression --message="Installing NodeJS dependencies (this is going to take a while...)" - ynh_exec_warn_less sudo -u $app env PATH=$PATH yarn install - ynh_script_progression --message="Building NodeJS application (this is going to take a while...)" - ynh_exec_warn_less sudo -u $app env PATH=$PATH NODE_BUILD_MEMORY=1024 yarn run build -popd - -ynh_secure_remove --file="$final_path/live/js" +#ynh_secure_remove --file="$final_path/live/js" ynh_script_progression --message="Building Elixir application (this is going to take a while...)" pushd $final_path/live - sudo -u "$app" MIX_ENV=prod mix local.hex --force - sudo -u "$app" MIX_ENV=prod mix local.rebar --force - ynh_exec_warn_less sudo -u "$app" MIX_ENV=prod mix deps.get - ynh_exec_warn_less sudo -u "$app" MIX_ENV=prod mix compile + #sudo -u "$app" MIX_ENV=prod mix local.hex --force + #sudo -u "$app" MIX_ENV=prod mix local.rebar --force + #ynh_exec_warn_less sudo -u "$app" MIX_ENV=prod mix deps.get + #ynh_exec_warn_less sudo -u "$app" MIX_ENV=prod mix compile sudo -u "$app" MIX_ENV=prod mix mobilizon.instance gen --force --output $config --output-psql /tmp/setup_db.psql --domain $domain --instance-name "Mobilizon" --admin-email "$app@$domain" --dbhost localhost --dbname $db_name --dbuser $db_user --dbpass $db_pwd --listen-port $port popd @@ -193,7 +173,7 @@ pushd $final_path/live ynh_replace_string --match_string="__YNH_USER__" --replace_string="${app}_notifs" --target_file="$config" ynh_replace_string --match_string="__YNH_USER_PASSWORD__" --replace_string="${ynh_user_password}" --target_file="$config" # Compile *again* because we added ldap conf in between... dunno if the first is relevant - sudo -u "$app" MIX_ENV=prod mix compile + #sudo -u "$app" MIX_ENV=prod mix compile ynh_secure_remove --file="/tmp/setup_db.psql" sudo -u "$app" MIX_ENV=prod mix ecto.migrate