routinator icon indicating copy to clipboard operation
routinator copied to clipboard

Docker compose, traefik integration

Open bluikko opened this issue 4 years ago • 0 comments

The Docker setup here uses compose and websites are routed through traefik. I would guess that is a very common setup. So I wanted to share the docker-compose file I came up with in case it is useful to someone else. I am not an expert so feedback is useful as well.

It is for traefik v1.7 (traefik v2.x would likely be different) and the RTR port is just passed through outside of traefik. In more complex setups it may be easier to route that through traefik as well.

This setup will be moving to swarm + traefik v2 so I will probably share that too if it is useful.

version: '3'
 
services:
    routinator:
        image: nlnetlabs/routinator:latest
        restart: unless-stopped
        ports:
            - '3323:3323'
        volumes:
            - routinator-tals:/home/routinator/.rpki-cache/tals:Z
        labels:
            - "traefik.enable=true"
            - "traefik.docker.network=proxy"
            - "traefik.frontend.rule=Host:${ROUTINATOR_URL_HOSTNAME}"
            - "traefik.frontend.passHostHeader=true"
            # for https
            # - "traefik.frontend.entryPoints=http,https"
            # - "traefik.frontend.redirect.entryPoint=https"
            # for http
            - "traefik.frontend.entryPoints=http"
            - "traefik.port=9556"
        networks:
            proxy:
 
networks:
    proxy:
        external: true
 
volumes:
    # create & init this before starting first time by following the 2 commands published in "Quick Start with Docker"
    routinator-tals:
        external: true

bluikko avatar Jun 30 '21 08:06 bluikko