Deploy auto-renewable HTTPS

In this guide we will see in quite similar steps with "Deploy your first container", how Cycleops makes it ridiculously easy for us to deploy our web applications in containers with automatically renewable HTTPS, on the hosts of our choice (cloud or bare metal), with a self‑service no‑code workflow.

To achieve this we will use the docker-nginx-auto-ssl Docker image, which is based on NGINX, with support for HTTP/2 and WebSocket and uses Let's Encrypt for automatic generation and renewal of HTTPS certificates.

Preparation

Before following the steps in this guide, let's make sure the following are available:

  • A server running Linux.
  • A public IP that can be used to access the server above.
  • A domain or subdomain (e.g. app.example.com).
  • A DNS A record for our domain or subdomain (e.g. app.example.com) pointing to the public IP of our server.
  • Inbound traffic to the server is allowed through port 22 (SSH), for Cycleops to run the deployments.
  • Inbound traffic to the server is allowed through port 80 (HTTP), for us to access our deployed container.
  • Inbound traffic to the server is allowed through port 443 (HTTPS), for us to access our deployed container securely.

Steps

To deploy your first container on Cycleops:

  1. Create a new host
  2. Create a new service using the Docker Container Group unit, with two containers configured:
    • First container:
      • Name: app
      • Image: public.ecr.aws/cycleops/sample-docker
      • Tag: latest
    • Second container:
      • Name: nginx
      • Image: valian/docker-nginx-auto-ssl
      • Tag: latest
      • Ports:
        • 80:80
        • 443:443
      • Volumes:
        • ssl_data:/etc/resty-auto-ssl
      • Env vars:
        • ALLOWED_DOMAINS: app.example.com
        • SITES: app.example.com=app:80
  3. Create a new stack with the following units (order matters):
    • Docker Container Group
    • Docker Engine
  4. Create a new setup with the following configuration:
    • Stack: The one we created above.
    • Service for Docker Container Group: The one we created above.
    • Service for Docker Engine: The default configuration available.
    • Target host: The one we created above
  5. Deploy the setup we created above.

Now, you can verify your container is running by accessing the domain or subdomain pointing to your servers public IP, in your browser (e.g. https://app.example.com).