mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
Improve installation docs
This commit is contained in:
parent
36312e91e4
commit
3c2a2a0adf
9
docs/src/administration_install_ansible.md
vendored
9
docs/src/administration_install_ansible.md
vendored
@ -1,5 +1,7 @@
|
|||||||
# Ansible Installation
|
# Ansible Installation
|
||||||
|
|
||||||
|
This is the same as the [Docker installation](administration_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) (e.g. using `sudo apt install ansible`) or the equivalent for you platform.
|
First, you need to [install Ansible on your local computer](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) (e.g. using `sudo apt install ansible`) or the equivalent for you platform.
|
||||||
|
|
||||||
Then run the following commands on your local computer:
|
Then run the following commands on your local computer:
|
||||||
@ -11,3 +13,10 @@ cp inventory.example inventory
|
|||||||
nano inventory # enter your server, domain, contact email
|
nano inventory # enter your server, domain, contact email
|
||||||
ansible-playbook lemmy.yml --become
|
ansible-playbook lemmy.yml --become
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To update to a new version, just run the following in your local Lemmy repo:
|
||||||
|
```bash
|
||||||
|
git pull origin master
|
||||||
|
cd ansible
|
||||||
|
ansible-playbook lemmy.yml --become
|
||||||
|
```
|
18
docs/src/administration_install_docker.md
vendored
18
docs/src/administration_install_docker.md
vendored
@ -1,29 +1,33 @@
|
|||||||
# Docker Installation
|
# Docker Installation
|
||||||
|
|
||||||
Make sure you have both docker and docker-compose(>=`1.24.0`) installed:
|
Make sure you have both docker and docker-compose(>=`1.24.0`) installed. On Ubuntu, just run `apt install docker-compose docker.io`. Next,
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkdir lemmy/
|
# create a folder for the lemmy files. the location doesnt matter, you can put this anywhere you want
|
||||||
cd lemmy/
|
mkdir /lemmy
|
||||||
|
cd /lemmy
|
||||||
|
# download default config files
|
||||||
wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/prod/docker-compose.yml
|
wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/prod/docker-compose.yml
|
||||||
wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/lemmy.hjson
|
wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/lemmy.hjson
|
||||||
wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/iframely.config.local.js
|
wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/iframely.config.local.js
|
||||||
# Edit lemmy.hjson, and docker-compose.yml to do more configuration (like adding a custom password)
|
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
and go to http://localhost:8536.
|
After this, have a look at the [config file](administration_configuration.md) named `lemmy.hjson`, and adjust it, in particular the hostname.
|
||||||
|
|
||||||
[A sample nginx config](/ansible/templates/nginx.conf) (Note: Avatar / Image uploading won't work without this), could be setup with:
|
To make Lemmy available outside the server, you need to setup a reverse proxy, like Nginx. [A sample nginx config](/ansible/templates/nginx.conf), could be setup with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
wget https://raw.githubusercontent.com/dessalines/lemmy/master/ansible/templates/nginx.conf
|
wget https://raw.githubusercontent.com/dessalines/lemmy/master/ansible/templates/nginx.conf
|
||||||
# Replace the {{ vars }}
|
# Replace the {{ vars }}
|
||||||
sudo mv nginx.conf /etc/nginx/sites-enabled/lemmy.conf
|
sudo mv nginx.conf /etc/nginx/sites-enabled/lemmy.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You will also need to setup TLS, for example with [Let's Encrypt](https://letsencrypt.org/). After this you need to restart Nginx to reload the config.
|
||||||
|
|
||||||
## Updating
|
## Updating
|
||||||
|
|
||||||
To update to the newest version, run:
|
To update to the newest version, you can manually change the version in `docker-compose.yml`. Alternatively, fetch the latest version from our git repo:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/prod/docker-compose.yml
|
wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/prod/docker-compose.yml
|
||||||
|
Loading…
Reference in New Issue
Block a user