Custom SSL certificate

Alternatively simply generate a new SSL certificate using Traefik in your Docker environment within Wappler and use that (Wappler fully supports this), rather than trying to use your current certificate and implementing it in your configuration, which seems to be causing you a lot of unnecessary aggravation… Lets Encrypt certificates are free and won’t cost you a penny, and Wappler is built to allow for this scenario, with support and plenty of threads covering the implementation… Then you can stop wasting your time and get on with what you want to achieve. Just a thought.

There might be dozens of reasons why I need to use my custom certificate.
I know how to use Traefik and in my particular scenario - this won’t work.

Thank you everyone for trying to help me.
When I’ll figure out how to do this - I’ll post a guide.

P.S.
It’s very weird why such a common and essential thing like configuring custom SSL certificate is not yet implemented in Wappler itself.

Instructions I’ve been following:

Rancher OS (Docker installation and configuration) - https://medium.com/@benjaminabt/install-rancheros-in-hyper-v-564d22c51f8a
Traefik configuration: https://kevinquillen.com/setting-traefik-2-local-ssl-certificate

I’ve managed to bring my website with custom SSL certificates.
As I promised you can follow general steps:

Edit your production Dockercompose file

  1. Add Traefik 2.0 image and parameters
  2. Edit your web listening ports
  3. Add location for your certificates and Traefik yaml configuration file
  4. Upload your certificates and Traefik yaml to your docker server
  5. Deploy your project to production

This is code example that need to be added:

labels:
  - >-
    traefik.http.middlewares.KMS_traefik_web_https.redirectscheme.scheme=https
  - traefik.http.routers.KMS_traefik_web.entrypoints=web
  - traefik.http.routers.KMS_traefik_web.rule=Host(`YOURDOMAIN`)
  - >-
    traefik.http.routers.KMS_traefik_web.middlewares=KMS_traefik_web_https@docker
  - >-
    traefik.http.routers.KMS_traefik_web_https.rule=Host(`YOURDOMAIN`)
  - traefik.http.routers.KMS_traefik_web_https.tls=true
  - traefik.http.routers.KMS_traefik_web_https.entrypoints=websecure
  traefik:
image: traefik:v2.0
container_name: "KMS_traefik"
command:
  - --entrypoints.web.address=:80
  - --entrypoints.websecure.address=:443
  - --providers.docker=true
  - --providers.file.directory=/etc/traefik/dynamic_conf
ports:
  - '80:80'
  - '443:443'
volumes:
  - /tools/certs:/tools/certs
  - /tools/traefik/config.yml:/etc/traefik/dynamic_conf/conf.yml:ro
  - /var/run/docker.sock:/var/run/docker.sock
2 Likes