Deployment

Deployment #

The following is an example stack which you can use to get started. More examples are added/available on our quantum-caddy Github repository.

Please adjust the caddy.email before pasting/deploying the stack. The email address is used for Let’s Encrypt and automatic TLS/SSL.
Please note that the example uses the :dev version. Please see the Github repository for versions.
version: "3.8"

services:
  proxy:
    image: r.planetary-quantum.com/quantum-public/caddy:dev
    ports:
      - target: 80
        published: 80
        protocol: tcp
        mode: host
      - target: 443
        published: 443
        protocol: tcp
        mode: host
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - caddy-data:/data
    labels:
      - 'caddy.email=YOUR@EMAIL.ORG'
    deploy:
      mode: global
      placement:
        constraints: 
          - node.role == manager
    networks:
      - public

volumes:
  caddy-data:

networks:
  public:
    external: true