Planka SSL & API
Hello dears I installed planka in my server but i cannot make it https and working just with http. I do not want to use nginx config to include my certificate and want to use docker compose instead. Would you please help me do this? And second question is that i want to talk planka with api to update new changes in my help desk application through it. Does planka have any documents for this? Thank you very much
Hi! Currently, there is no simple config for SSL without a load balancer. It can be achieved with some code modifications and rebuild a docker file. You should change two files for that: provide an SSL option here server/config/env/production.js using this documentation (certificate/key files should be added to the project before docker build command), change to HTTPS here client/src/constants/Config.js. Then docker build -t planka . in the root folder. Now you can change the image in docker-compose.yml from meltyshev/planka:latest to planka.
API documentation will be done after we make a new role system. Didn't have time for that :(
Currently, there is no simple config for SSL without a load balancer.
Is it planned to change anytime soon? Sails.js documentaion says:
Don't worry about configuring Sails to use an SSL certificate. SSL will almost always be resolved at your load balancer/proxy server or by your PaaS provider.
Why isn't Plank compliant with that? What's the gap?
@eran- you can add an Nginx container to the docker-compose, attach the volume there with config and certs. They correctly said that this is more a task of the proxy server. Also, every PaaS provider already working under a proxy server. We will add some information about how to achieve that locally in the documentation after release.
This is NOT required by planka. You can easily use SSL via nginx-proxy-companion. After setting that up you can install planka via the docker-compose below after pointing a subdomain/domain that you point to your server. This will result in planka app running on https://planka.domain.tld
version: "2"
services:
planka:
image: meltyshev/planka:latest
command: >
bash -c
"for i in `seq 1 30`; do
./start.sh &&
s=$$? && break || s=$$?;
echo \"Tried $$i times. Waiting 5 seconds...\";
sleep 5;
done; (exit $$s)"
restart: always
container_name: planka
volumes:
- /docker/data/planka/user-avatars:/app/public/user-avatars
- /docker/data/planka/project-background-images:/app/public/project-background-images
- /docker/data/planka/attachments:/app/public/attachments
environment:
- VIRTUAL_HOST=planka.domain.tld
- VIRTUAL_PORT=1337
- LETSENCRYPT_HOST=planka.domain.tld
- [email protected]
- BASE_URL=https://planka.domain.tld
- DATABASE_URL=postgresql://postgres:RANDOMPWD@postgres/planka
- SECRET_KEY=SOMESECRET
depends_on:
- postgres
postgres:
image: postgres:alpine
restart: always
container_name: postgres
volumes:
- /docker/data/planka/postgres:/var/lib/postgresql/data
environment:
- POSTGRES_DB=planka
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_PASSWORD=RANDOMPWD
networks:
default:
external:
name: nginx-proxy
how do I rebuild this docker to add ssl?
how do I rebuild this docker to add ssl?
You don't. The docker image is pre-built.