From beb4981c22462f4d671fe1098320ff32e1f1c271 Mon Sep 17 00:00:00 2001 From: Felix Pojtinger Date: Sat, 27 Apr 2019 03:39:06 +0200 Subject: [PATCH] build: Fix hot reloading of UI, improve docs --- README.md | 10 ++++++---- server/stack.dev.yaml | 4 ++-- skaffold.yaml | 8 ++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 33798d14a..cdd8c34c7 100644 --- a/README.md +++ b/README.md @@ -83,19 +83,21 @@ skaffold run -p lemmy--prod #### Kubernetes -This requires: +##### Requirements -- Local or remote Kubernetes Cluster, i.e. [`minikube`](https://kubernetes.io/docs/tasks/tools/install-minikube/) +- 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/) -After satisfying the requirements, run the following: +##### Running ```bash skaffold dev -p lemmy--dev ``` -And goto http://localhost:4444. +And goto http://localhost:4444 (automatically proxies to localhost, both if the cluster is local or remote). + +It hot-reloads the UI and automatically recompiles the server. #### Non-Kubernetes diff --git a/server/stack.dev.yaml b/server/stack.dev.yaml index 9e00e4fb0..7c6905b3b 100644 --- a/server/stack.dev.yaml +++ b/server/stack.dev.yaml @@ -93,8 +93,8 @@ spec: name: lemmy-server--dev resources: limits: - memory: 256Mi - cpu: 256m + memory: 512Mi + cpu: 512m ports: - containerPort: 8536 --- diff --git a/skaffold.yaml b/skaffold.yaml index d8ab281ba..88b7a0de8 100644 --- a/skaffold.yaml +++ b/skaffold.yaml @@ -9,15 +9,15 @@ profiles: docker: dockerfile: Dockerfile.dev sync: - "**/*.rs": src/ + "***/*.rs": . - image: registry.gitlab.com/pojntfx/lemmy/ui.dev context: ui docker: dockerfile: Dockerfile.dev sync: - "**/*.ts": src/ - "**/*.tsx": src/ - "**/*.css": src/ + "***/*.ts": . + "***/*.tsx": . + "***/*.css": . deploy: kubectl: manifests: