Planka SSL & API #31

Closed
opened 2026-02-04 16:41:05 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @nematollahian on GitHub (Oct 2, 2020).

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

Originally created by @nematollahian on GitHub (Oct 2, 2020). 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
OVERLORD added the enhancementdocumentation labels 2026-02-04 16:41:05 +03:00
Author
Owner

@meltyshev commented on GitHub (Oct 5, 2020):

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 :(

@meltyshev commented on GitHub (Oct 5, 2020): 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](https://sailsjs.com/documentation/reference/configuration/sails-config#?sailsconfigssl) (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 :(
Author
Owner

@ghost commented on GitHub (Oct 19, 2020):

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?

@ghost commented on GitHub (Oct 19, 2020): > Currently, there is no simple config for SSL without a load balancer. Is it planned to change anytime soon? [Sails.js documentaion says](https://sailsjs.com/documentation/concepts/deployment#?deploying-on-a-single-server): > 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?
Author
Owner

@meltyshev commented on GitHub (Dec 26, 2020):

@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.

@meltyshev commented on GitHub (Dec 26, 2020): @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.
Author
Owner

@wayneconnolly commented on GitHub (Jan 5, 2021):

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
      - LETSENCRYPT_EMAIL=name@domain.tld
      - 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
@wayneconnolly commented on GitHub (Jan 5, 2021): This is NOT required by planka. You can easily use SSL via [nginx-proxy-companion](https://hub.docker.com/r/jrcs/letsencrypt-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 - LETSENCRYPT_EMAIL=name@domain.tld - 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 ```
Author
Owner

@TOWUK commented on GitHub (Aug 1, 2021):

how do I rebuild this docker to add ssl?

@TOWUK commented on GitHub (Aug 1, 2021): how do I rebuild this docker to add ssl?
Author
Owner

@wayneconnolly commented on GitHub (Sep 26, 2021):

how do I rebuild this docker to add ssl?

You don't. The docker image is pre-built.

@wayneconnolly commented on GitHub (Sep 26, 2021): > how do I rebuild this docker to add ssl? You don't. The docker image is pre-built.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#31