Updating ansible instructions.

This commit is contained in:
Dessalines 2021-10-11 23:00:41 -04:00
parent 9ca86abb39
commit da1ee70d5b
4 changed files with 8 additions and 30 deletions

View file

@ -132,7 +132,7 @@ Let's Encrypt certificates should be renewed automatically, so add the line belo
Finally, add the nginx config. After downloading, you need to replace some variables in the file.
```bash
curl https://raw.githubusercontent.com/LemmyNet/lemmy/main/ansible/templates/nginx.conf \
curl https://raw.githubusercontent.com/LemmyNet/lemmy-ansible/main/templates/nginx.conf \
--output /etc/nginx/sites-enabled/lemmy.conf
# put your actual domain instead of example.com
sed -i -e 's/{{domain}}/example.com/g' /etc/nginx/sites-enabled/lemmy.conf
@ -154,7 +154,7 @@ mkdir /var/lib/pictrs-source
cd /var/lib/pictrs
git clone https://git.asonix.dog/asonix/pict-rs.git .
# check docker-compose.yml for pict-rs version used by lemmy
# https://github.com/LemmyNet/lemmy/blob/main/ansible/templates/docker-compose.yml#L40
# https://github.com/LemmyNet/lemmy-ansible/blob/main/templates/docker-compose.yml#L40
git checkout v0.2.6-r2
# or simply add the bin folder to your $PATH
$HOME/.cargo/bin/cargo build --release
@ -227,10 +227,10 @@ cd /var/lib/pictrs-source
git checkout main
git pull --tags
# check docker-compose.yml for pict-rs version used by lemmy
# https://github.com/LemmyNet/lemmy/blob/main/ansible/templates/docker-compose.yml#L40
# https://github.com/LemmyNet/lemmy-ansible/blob/main/templates/docker-compose.yml#L40
git checkout v0.2.6-r2
# or simply add the bin folder to your $PATH
$HOME/.cargo/bin/cargo build --release
cp target/release/pict-rs /usr/bin/
systemctl restart pictrs
```
```

View file

@ -1,25 +1,3 @@
# Ansible Installation
This is the same as the [Docker installation](install_docker.md), except that Ansible handles all of it automatically. It also does some extra things like setting up TLS and email for your Lemmy instance.
First, you need to [install Ansible on your local computer](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html). You also need to install the [Docker SDK for Python](https://pypi.org/project/docker/) using `pip install docker` ([more info in Ansible documentation](https://docs.ansible.com/ansible/latest/collections/community/docker/docker_compose_module.html#id4)).
Then run the following commands on your local computer:
```bash
git clone https://github.com/LemmyNet/lemmy.git
cd lemmy/ansible/
cp inventory.example inventory
nano inventory # enter your server, domain, contact email
# If the command below fails, you may need to comment out this line
# In the ansible.cfg file:
# interpreter_python=/usr/bin/python3
ansible-playbook lemmy.yml --become
```
To update to a new version, just run the following in your local Lemmy repo:
```bash
git pull origin main
cd ansible
ansible-playbook lemmy.yml --become
```
Follow the instructions on the [Lemmy-Ansible](https://github.com/LemmyNet/lemmy-ansible) repo.

View file

@ -32,10 +32,10 @@ After this, have a look at the [config file](configuration.md) named `lemmy.hjso
You can access the lemmy-ui at `http://localhost:1235`
To make Lemmy available outside the server, you need to setup a reverse proxy, like Nginx. [A sample nginx config](https://raw.githubusercontent.com/LemmyNet/lemmy/main/ansible/templates/nginx.conf), could be setup with:
To make Lemmy available outside the server, you need to setup a reverse proxy, like Nginx. [A sample nginx config](https://github.com/LemmyNet/lemmy-ansible/blob/main/templates/nginx.conf), could be setup with:
```bash
wget https://raw.githubusercontent.com/LemmyNet/lemmy/main/ansible/templates/nginx.conf
wget https://raw.githubusercontent.com/LemmyNet/lemmy-ansible/main/templates/nginx.conf
# Replace the {{ vars }}
# The default lemmy_port is 8536
# The default lemmy_ui_port is 1235

View file

@ -63,4 +63,4 @@ function setForwardedHeaders(
let headers = setForwardedHeaders(req.headers);
let client = new LemmyHttp(httpUri, headers);
```
```