vmware-archive / aci-templates

Bitnami templates for Azure Container Instances (ACI)
Apache License 2.0
2 stars 5 forks source link

Clues for adding SSL certificate to Wordpress container #4

Open Air-Git opened 5 years ago

Air-Git commented 5 years ago

Any clues for adding an SSL certificate to the Bitnami ACI wordpress configuration? I am trying to get the big picture of how this would work. I guess that it would not be possible to generate a certificate for the container, because there is no persistent volume to store it on, and possibly no tool to generate the cert. An alternative might be to put an NGINX container in front of the Wordpress container. If I adapt the ACI template to serve only port 443, then I guess I could just publish the NGINX URL in DNS. If a user went direct to the Wordpress container IP address on 443 they would just get a certificate error, which is not a problem.

rafariossaa commented 5 years ago

Hi @Air-Git, This template use bitnami/wordpress image that includes a apache, so you can access the running container and add what you need. The problem is if you delete the container you will loose what ever you added.

Air-Git commented 4 years ago

This is the problem: how to customise the config. I am thinking the simplest thing might be to deploy a NGINX container in front of the Wordpress container. I would need to turn off the public ports of the Wordpress container, and have the NGINX instance with a front end SSL, and back end talking to Wordpress. Its clumsy. An alternative would be a Bitnami ACI template for Wordpress with NGINX.

juan131 commented 4 years ago

Hi @Air-Git

These templates are just meant to provide a starting point so you can create you own templates to deploy containers on Azure ACI. We don't plan to publish new templates with more complex scenarios (such as WP+MariaDB with NGINX as a proxy providing TLS support).

The instructions to include your own SSL certificates in the Bitnami WordPress image are detailed in the link below:

https://github.com/bitnami/bitnami-docker-apache#using-custom-ssl-certificates

As an alternative to these templates, you can deploy Bitnami containers on Azure AKS using Bitnami helm charts. These charts already provide mechanisms to customize your setups (for instance, you can use Ingress and TLS secrets to deploy the WordPress Helm chart with your own TLS certificates). Find more information in the link below: