Hello
I can start the app locally as: MIX_ENV=dev iex -S mix phx.server
without any issue, but if I start the app in a systemd, I got error:
Could not start Hex. Try fetching a new version with "mix local.hex" or uninstalling it with "mix archive.uninstall hex.ez"
$ bash[38908]: ** (MatchError) no match of right hand side value: {:error, {:ssl, {'no such file or directory', 'ssl.app'}}}
Here is my systemd file:
[Unit]
Description=phoenix server
Requires=network.target
[Service]
Type=simple
User=samir
Group=samir
Environment=PATH=/home/samir/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH
Environment=MIX_ENV=dev "PORT=4000"
WorkingDirectory=/home/samir/projects/ngspice-server/
ExecStart=/usr/bin/bash -lc '/home/samir/.asdf/shims/iex -S mix phx.server'
TimeoutSec=30
RestartSec=15s
Restart=always
[Install]
WantedBy=multi-user.target
But I start it locally at terminal successfully using the same command in systemd:
/usr/bin/bash -lc '/home/samir/.asdf/shims/iex -S mix phx.server'
Any idea?