-
Proposal:
Instead of .bashrc, use .bash_profile. Bash non-interactive login can properly take those values automatically
Instead of
Environment="PATH=/var/lib/pleroma/.asdf/shims:/var/lib/pleroma/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ExecStart=/var/lib/pleroma/.asdf/shims/mix phx.server
Use just
ExecStart=/usr/bin/bash -lc 'mix phx.server'
Explanation:
Instead of defining path-to-asdf and set up a strict PATH, you can delegate bash to handle that. That means your modification to pleroma.service is just one single line.
-
At least for me, this is how the process is executed by Systemd
... Ssl 15:26 60:57 /var/lib/pleroma/.asdf/installs/erlang/23.3.4/erts-11.2.2/bin/beam.smp -- -root /var/lib/pleroma/.asdf/installs/erlang/23.3.4 -progname erl -- -home /var/lib/pleroma -- -pa /var/lib/pleroma/.asdf/installs/elixir/1.11/bin/../lib/eex/ebin /var/lib/pleroma/.asdf/installs/elixir/1.11/bin/../lib/elixir/ebin /var/lib/pleroma/.asdf/installs/elixir/1.11/bin/. ./lib/ex_unit/ebin /var/lib/pleroma/.asdf/installs/elixir/1.11/bin/../lib/iex/ebin /var/lib/pleroma/.asdf/installs/elixir/1.11/bin/../lib/logger/ebin /var/lib/pleroma/.asdf/installs/elixir/1.11/bin/../lib/mix/e bin -noshell -s elixir start_cli -extra /var/lib/pleroma/.asdf/installs/elixir/1.11/bin/mix phx.server
Not saying A or B is better, just simplicity over complexity understanding this is still workaround instead of a final solution.
-
Going through the instructions as written, I ended up with lots of errors during the
mix compile
step, mentioning files that were compiled for a higher Erlang version.I then removed the
_build
directory (in/opt/pleroma
) and re-did the steps starting frommix local.hex --force
, after which the compilation worked fine.
Please register or sign in to comment