mirror of
https://github.com/LemmyNet/lemmy-docs.git
synced 2024-11-22 04:11:09 +00:00
Updating ansible instructions.
This commit is contained in:
parent
9ca86abb39
commit
da1ee70d5b
4 changed files with 8 additions and 30 deletions
|
@ -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.
|
Finally, add the nginx config. After downloading, you need to replace some variables in the file.
|
||||||
```bash
|
```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
|
--output /etc/nginx/sites-enabled/lemmy.conf
|
||||||
# put your actual domain instead of example.com
|
# put your actual domain instead of example.com
|
||||||
sed -i -e 's/{{domain}}/example.com/g' /etc/nginx/sites-enabled/lemmy.conf
|
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
|
cd /var/lib/pictrs
|
||||||
git clone https://git.asonix.dog/asonix/pict-rs.git .
|
git clone https://git.asonix.dog/asonix/pict-rs.git .
|
||||||
# check docker-compose.yml for pict-rs version used by lemmy
|
# 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
|
git checkout v0.2.6-r2
|
||||||
# or simply add the bin folder to your $PATH
|
# or simply add the bin folder to your $PATH
|
||||||
$HOME/.cargo/bin/cargo build --release
|
$HOME/.cargo/bin/cargo build --release
|
||||||
|
@ -227,7 +227,7 @@ cd /var/lib/pictrs-source
|
||||||
git checkout main
|
git checkout main
|
||||||
git pull --tags
|
git pull --tags
|
||||||
# check docker-compose.yml for pict-rs version used by lemmy
|
# 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
|
git checkout v0.2.6-r2
|
||||||
# or simply add the bin folder to your $PATH
|
# or simply add the bin folder to your $PATH
|
||||||
$HOME/.cargo/bin/cargo build --release
|
$HOME/.cargo/bin/cargo build --release
|
||||||
|
|
|
@ -1,25 +1,3 @@
|
||||||
# Ansible Installation
|
# 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.
|
Follow the instructions on the [Lemmy-Ansible](https://github.com/LemmyNet/lemmy-ansible) repo.
|
||||||
|
|
||||||
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
|
|
||||||
```
|
|
||||||
|
|
|
@ -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`
|
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
|
```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 }}
|
# Replace the {{ vars }}
|
||||||
# The default lemmy_port is 8536
|
# The default lemmy_port is 8536
|
||||||
# The default lemmy_ui_port is 1235
|
# The default lemmy_ui_port is 1235
|
||||||
|
|
Loading…
Reference in a new issue