Implement ssl to a WP docker container [closed]

I was able to setup a WordPress containerised app using the docker-compose.yml file below and it is working fine:

wp1:
  image: wordpress
  links:
    - db:mysql
  ports:
    - 9001:80
  environment:
    WORDPRESS_DB_NAME: mysql_db1
db:
  image: mariadb
  environment:
    MYSQL_ROOT_PASSWORD: password
phpmyadmin:
  image: corbinu/docker-phpmyadmin
  links:
    - db:mysql
  ports:
    - 8000:80

I also installed lets-encrypt and was able to make my main domain in https work like https://domain.com but when I access the WP app in docker https://domain.com:9001 it is not working but http://domain.com:9001 is working

What I have tried is changing the ports from

ports:
   - 9001:80

to

ports:
  - 9001:443

I’m using the default Digitalocean 1-click app 1.12.3 docker in Ubuntu 16.4 running on Apache2

What would be the proper way to implement ssl so I can access my dockerised sites with ssl like: https://domain.com:9001 ?

0

Leave a Comment