From 353bb0f2b07914b1f703e797c072316d69165024 Mon Sep 17 00:00:00 2001 From: Rafly Maulana Date: Thu, 10 Nov 2022 20:48:38 +0700 Subject: [PATCH] meta: Add documentation for installing Planka without Docker (#323) --- README.md | 143 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 142 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index aa013b0a..1fe3ef3e 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,12 @@ A Trello-like kanban board built with React and Redux. ## Deploy -### Docker Compose +There are 2 types of installation: +1. [Dockerized](#1-docker-compose) +2. [Without Docker](#2-without-docker) + + +### 1. Docker Compose [![](https://d207aa93qlcgug.cloudfront.net/1.95.5.qa/img/nav/docker-logo-loggedout.png)](https://hub.docker.com/r/meltyshev/planka) @@ -44,6 +49,142 @@ docker-compose up -d Demo user: demo@demo.demo demo +### 2. Without Docker + +Installing without Docker is a bit more complicated, here's what you need to do: + +1. Clone this repository into a directory of your choice. (e.g. `/var/www/planka`) + +```bash +mkdir -p /var/www/planka +cd /var/www/planka +git clone https://github.com/plankanban/planka.git . +``` + +2. Install dependencies for client and build it. + +```bash +cd client +npm install +npm run build +``` + +**Note**: You can use `yarn` or `pnpm` instead of `npm`. + +3. Copy the `build` directory to the `server/public` directory. + +```bash +cp -r build ../server/public +``` + +4. Install dependencies for server. + +```bash +cd ../server +npm install +``` + +5. Configure environment variables. + +```bash +cp .env.sample .env + +# Edit .env file (You could use nano, vim, etc.) +nano .env +``` + +**Note**: Before continuing, make sure you have your selected database created and running. + +6. Copy start script from the root directory to the `server` directory. + +```bash +cp ../docker-start.sh start.sh +``` + +7. Start the server. + +```bash +./start.sh +``` + +**Note**: You can use `pm2` or `systemd` to run the server in the background. + +## Additional information + +### Nginx configuration + +Here is an example of Nginx configuration for Planka, make sure to replace `` with your domain name, and make sure to configure the SSL. + +```nginx +upstream planka { + server localhost:1337; + keepalive 32; +} + +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name ; + + access_log /var/log/nginx/planka-access.log; + error_log /var/log/nginx/planka-error.log error; + + # SSL Configuration - Replace the example with your domain + ssl_certificate /etc/letsencrypt/live//fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live//privkey.pem; + ssl_session_cache shared:SSL:10m; + ssl_protocols TLSv1.2 TLSv1.3; + ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384"; + ssl_prefer_server_ciphers on; + + client_max_body_size 120M; + add_header Access-Control-Allow-Origin *; + add_header Access-Control-Max-Age 3600; + add_header Access-Control-Expose-Headers Content-Length; + add_header Access-Control-Allow-Headers Range; + + # Make sure to allow socket.io connections + location ~* \.io { + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + client_max_body_size 50M; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Frame-Options SAMEORIGIN; + proxy_buffers 256 16k; + proxy_buffer_size 16k; + client_body_timeout 60; + send_timeout 300; + lingering_timeout 5; + proxy_connect_timeout 1d; + proxy_send_timeout 1d; + proxy_read_timeout 1d; + proxy_pass http://planka; + } + + location / { + client_max_body_size 50M; + proxy_set_header Connection ""; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Frame-Options SAMEORIGIN; + proxy_buffers 256 16k; + proxy_buffer_size 16k; + proxy_read_timeout 600s; + proxy_cache_revalidate on; + proxy_cache_min_uses 2; + proxy_cache_use_stale timeout; + proxy_cache_lock on; + proxy_http_version 1.1; + proxy_pass http://planka; + } +} +``` + ### Logging Planka currently allows you to expose the application's logfile directory to the host machine via a shared volume. This feature is not enabled by default.