summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2019-08-20 16:20:46 -0700
committerDessalines <tyhou13@gmx.com>2019-08-20 16:20:46 -0700
commit431210025df8f4ab5eeb2eb4c39b449aba308b58 (patch)
tree97bc14df340725a105882041e9d4efe36434022b /README.md
parent06a94176715bcdf91d401698f91d89ba906906d0 (diff)
Some fixes for the docker build.
- Messed with readme. - They needed to be `.env`, not `env`. - Leaving the nginx file there, but extracting it out of the main setup. Ppl might use apache, or none at all. - Docker 3.3 doesn't work with the DB health check unfortunately, so I changed that back to 2.4. - Changed the env in the docker folder so it doesn't need to be edited, someone could just pull this and start it up if they just wanna test it.
Diffstat (limited to 'README.md')
-rw-r--r--README.md57
1 files changed, 24 insertions, 33 deletions
diff --git a/README.md b/README.md
index 2283ee46..af945f42 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@ Front Page|Post
- Open source, [AGPL License](/LICENSE).
- Self hostable, easy to deploy.
- - Comes with [Docker](#docker).
+ - Comes with [Docker](#docker), [Ansible](#ansible).
- Live-updating Comment threads.
- Full vote scores `(+/-)` like old reddit.
- Moderation abilities.
@@ -64,51 +64,42 @@ Made with [Rust](https://www.rust-lang.org), [Actix](https://actix.rs/), [Infern
## Install
-### Ansible (recommended)
+### Docker
-First, you need to [install Ansible on your local computer](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html),
-eg using `sudo apt install ansible`, or the equivalent for you platform.
-
-Then run the following commands on your local computer:
-```bash
-git clone https://github.com/dessalines/lemmy.git
-cd lemmy/ansible/
-cp inventory.example inventory
-nano inventory # enter your server, domain, contact email
-ansible-playbook lemmy.yml
-```
-
-### Manual
-
-Make sure you have both docker and docker-compose installed.
+Make sure you have both docker and docker-compose(>=`1.24.0`) installed.
```
mkdir lemmy/
cd lemmy/
wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/prod/docker-compose.yml
wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/prod/env -O .env
-wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/prod/nginx.conf
-# you need to edit .env and nginx.conf to replace the indicated {{ variables }}
-sudo mv nginx.conf /etc/nginx/sites-enabled/lemmy.conf
+# Edit the .env for custom passwords
docker-compose up -d
```
and goto http://localhost:8536
-### Nginx Config
+[A sample nginx config](/docker/prod/nginx.conf), could be setup with:
+
```
-location / {
- rewrite (\/(user|u|inbox|post|community|c|login|search|sponsors|communities|modlog|home)+) /static/index.html break;
- proxy_pass http://0.0.0.0:8536;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-
- # WebSocket support
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
-}
+wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/prod/nginx.conf
+# Replace the {{ vars }}
+sudo mv nginx.conf /etc/nginx/sites-enabled/lemmy.conf
+```
+
+### Ansible
+
+First, you need to [install Ansible on your local computer](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html),
+eg using `sudo apt install ansible`, or the equivalent for you platform.
+
+Then run the following commands on your local computer:
+
+```bash
+git clone https://github.com/dessalines/lemmy.git
+cd lemmy/ansible/
+cp inventory.example inventory
+nano inventory # enter your server, domain, contact email
+ansible-playbook lemmy.yml
```
## Develop