Reputation: 222
I have created node js api and hosted it in Azure Container Instance using registry. I am using my API using FQDN. Now I want to bind SSL Certificate to this instance. Is there any way to do so? I searched for solution but didn't found any.
Upvotes: 0
Views: 1306
Reputation: 28204
You can create a container group with an application container and a sidecar container running an SSL provider.
According to this document, you will do these:
For example, you could edit the following YAML file to meet your requirements.
api-version: 2018-10-01
location: westus
name: app-with-ssl
properties:
containers:
- name: nginx-with-ssl
properties:
image: nginx
ports:
- port: 443
protocol: TCP
resources:
requests:
cpu: 1.0
memoryInGB: 1.5
volumeMounts:
- name: nginx-config
mountPath: /etc/nginx
- name: my-app
properties:
image: mcr.microsoft.com/azuredocs/aci-helloworld
ports:
- port: 80
protocol: TCP
resources:
requests:
cpu: 1.0
memoryInGB: 1.5
volumes:
- secret:
ssl.crt: <Enter contents of base64-ssl.crt here>
ssl.key: <Enter contents of base64-ssl.key here>
nginx.conf: <Enter contents of base64-nginx.conf here>
name: nginx-config
ipAddress:
ports:
- port: 443
protocol: TCP
type: Public
osType: Linux
tags: null
type: Microsoft.ContainerInstance/containerGroups
Upvotes: 1