diff options
author | Felix Pojtinger <felix@pojtinger.com> | 2019-04-27 15:49:50 +0200 |
---|---|---|
committer | Felix Pojtinger <felix@pojtinger.com> | 2019-04-27 15:49:50 +0200 |
commit | c83f98ed5ca1eb4d7971a78a1b44eac069a72764 (patch) | |
tree | e87b2e951b20878771a9dd4151b6ffcd1af4f49e /README.md | |
parent | 74db51c6cdb0f9ca1353c76318f4ef3668272e2d (diff) |
build: Minimize build time with multi-stage build, add Ingress and production versions
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 74 |
1 files changed, 38 insertions, 36 deletions
@@ -11,19 +11,20 @@ A link aggregator / reddit clone for the fediverse. -[Lemmy Dev instance](https://dev.lemmy.ml) *for testing purposes only* +[Lemmy Dev instance](https://dev.lemmy.ml) _for testing purposes only_ This is a **very early beta version**, and a lot of features are currently broken or in active development, such as federation. -|Front Page|Post| -|-----------------------------------------------|----------------------------------------------- | -|![main screen](https://i.imgur.com/y64BtXC.png)|![chat screen](https://i.imgur.com/vsOr87q.png) | +| Front Page | Post | +| ----------------------------------------------- | ----------------------------------------------- | +| ![main screen](https://i.imgur.com/y64BtXC.png) | ![chat screen](https://i.imgur.com/vsOr87q.png) | ## Features - Open source, [AGPL License](/LICENSE). - Self hostable, easy to deploy. - - Comes with [docker](#docker). + - Comes with [Kubernetes](#kubernetes) + - Comes with [Docker](#docker). - Live-updating Comment threads. - Full vote scores `(+/-)` like old reddit. - Moderation abilities. @@ -56,65 +57,66 @@ Made with [Rust](https://www.rust-lang.org), [Actix](https://actix.rs/), [Infern ## Usage -### Production +### Kubernetes -#### Docker +#### Requirements -Make sure you have both docker and docker-compose installed. - -``` -git clone https://github.com/dessalines/lemmy -cd lemmy -./docker_update.sh # This pulls the newest version, builds and runs it -``` - -and goto http://localhost:8536 +- Local or remote Kubernetes cluster, i.e. [`minikube`](https://kubernetes.io/docs/tasks/tools/install-minikube/) +- [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/) +- [`skaffold`](https://skaffold.dev/) -<!-- #### Kubernetes (WIP) +#### Production -> TODO: Add production version with proper proxy setup and Ingress for WebSockets +```bash +# Deploy the Traefik Ingress +kubectl apply -f https://raw.githubusercontent.com/containous/traefik/v1.7/examples/k8s/traefik-rbac.yaml +kubectl apply -f https://raw.githubusercontent.com/containous/traefik/v1.7/examples/k8s/traefik-ds.yaml +# Replace ${IP} with your Ingress' IP +echo "${IP} dev.lemmy.local" >> /etc/hosts +``` ```bash skaffold run -p lemmy--prod -# Now go to http://${IP}:30002 -``` --> - -### Development - -#### Kubernetes - -##### Requirements +``` -- Local or remote Kubernetes cluster, i.e. [`minikube`](https://kubernetes.io/docs/tasks/tools/install-minikube/) -- [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/) -- [`skaffold`](https://skaffold.dev/) +Now go to http://dev.lemmy.local. -##### Running +#### Development ```bash skaffold dev -p lemmy--dev ``` -And goto http://localhost:4444 (automatically proxies to localhost, both if the cluster is local or remote). +Now go to http://localhost:4444. It automatically proxies to localhost, both if the cluster is local or remote; it also hot-reloads the UI and automatically recompiles and restarts the server. + +### Docker + +Make sure you have both docker and docker-compose installed. -It hot-reloads the UI and automatically recompiles the server. +``` +git clone https://github.com/dessalines/lemmy +cd lemmy +./docker_update.sh # This pulls the newest version, builds and runs it +``` + +and goto http://localhost:8536 -#### Non-Kubernetes +### Native -##### Requirements +#### Requirements - [Rust](https://www.rust-lang.org/) - [Yarn](https://yarnpkg.com/en/) - [Postgres](https://www.sqlite.org/index.html) -##### Set up Postgres DB +#### Set up Postgres DB ``` psql -c "create user rrr with password 'rrr' superuser;" -U postgres psql -c 'create database rrr with owner rrr;' -U postgres ``` -##### Running +#### Running ``` git clone https://github.com/dessalines/lemmy |