services:
    stepca:
        container_name: stepca_server
        env_file:
            - .env
        healthcheck:
            test: curl -k --fail https://localhost:9040/health || exit 1
            interval: 60s
            retries: 5
            start_period: 20s
            timeout: 10s
        image: smallstep/step-ca:latest
        logging:
            driver: json-file
            options:
                max-size: 50m
                max-file: "3"
        networks:
            traefik: null
        ports:
            - 9040:9040
        restart: always
        volumes:
            - step:/home/step

networks:
    traefik:
        name: traefik
        external: true

volumes:
    step:
        driver: local
        driver_opts:
            type: none
            o: bind
            device: /var/lib/docker/volumes/partition/step_server
