summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2021-05-29 11:24:22 -0500
committerAlex Gleason <alex@alexgleason.me>2021-05-29 11:39:07 -0500
commitfacb75079800d975c0141b84e55cf0d52d4a2b81 (patch)
treea302f125e906ce2f6016571ff51537711c2f2038
parent8871ca5aa35e9533e57b4a15420687869378a981 (diff)
Docs: install from source with asdfdocs-asdf
-rw-r--r--.gitignore3
-rw-r--r--.tool-versions2
-rw-r--r--docs/installation/debian_based_en.md49
-rw-r--r--installation/pleroma.service3
4 files changed, 37 insertions, 20 deletions
diff --git a/.gitignore b/.gitignore
index da73b6f36..32b44e4ff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -52,9 +52,6 @@ docs/generated_config.md
.idea
pleroma.iml
-# asdf
-.tool-versions
-
# Editor temp files
/*~
/*#
diff --git a/.tool-versions b/.tool-versions
new file mode 100644
index 000000000..3a4b4de4c
--- /dev/null
+++ b/.tool-versions
@@ -0,0 +1,2 @@
+elixir 1.11
+erlang 23.3.4
diff --git a/docs/installation/debian_based_en.md b/docs/installation/debian_based_en.md
index a9cf86ab3..614315591 100644
--- a/docs/installation/debian_based_en.md
+++ b/docs/installation/debian_based_en.md
@@ -38,22 +38,6 @@ sudo apt full-upgrade
sudo apt install git build-essential postgresql postgresql-contrib cmake libmagic-dev
```
-### Install Elixir and Erlang
-
-* Download and add the Erlang repository:
-
-```shell
-wget -P /tmp/ https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb
-sudo dpkg -i /tmp/erlang-solutions_2.0_all.deb
-```
-
-* Install Elixir and Erlang:
-
-```shell
-sudo apt update
-sudo apt install elixir erlang-dev erlang-nox
-```
-
### Optional packages: [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md)
```shell
@@ -84,6 +68,39 @@ sudo -Hu pleroma git clone -b stable https://git.pleroma.social/pleroma/pleroma
cd /opt/pleroma
```
+#### Install Elixir and Erlang
+
+* Become the Pleroma user:
+
+```shell
+sudo -Hu pleroma bash
+```
+
+* Install [asdf](https://asdf-vm.com/):
+
+```shell
+git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.0
+echo ". $HOME/.asdf/asdf.sh" >> ~/.bashrc
+echo ". $HOME/.asdf/completions/asdf.bash" >> ~/.bashrc
+exec bash
+asdf plugin-add erlang
+asdf plugin-add elixir
+```
+
+* Install Elixir and Erlang:
+
+```shell
+asdf install
+```
+
+* Return to the root user:
+
+```shell
+exit
+```
+
+#### Install Pleroma dependencies
+
* Install the dependencies for Pleroma and answer with `yes` if it asks you to install `Hex`:
```shell
diff --git a/installation/pleroma.service b/installation/pleroma.service
index 8338228d8..811f1e129 100644
--- a/installation/pleroma.service
+++ b/installation/pleroma.service
@@ -18,7 +18,8 @@ Environment="HOME=/var/lib/pleroma"
; Path to the folder containing the Pleroma installation.
WorkingDirectory=/opt/pleroma
; Path to the Mix binary.
-ExecStart=/usr/bin/mix phx.server
+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
; Some security directives.
; Use private /tmp and /var/tmp folders inside a new file system namespace, which are discarded after the process stops.