svenstaro/miniserve

Error: Refusing to start as no explicit serve path set..

Timmer2021 opened this issue · 2 comments

Trying to install miniserve via docker, using a stack in Portainer..

Here is the stack:
version: '3.3'
services:
miniserve:
container_name: miniserve
volumes:
- '/volume1/docker/miniserv:/tmp'
ports:
- '28529:8080'
restart: unless-stopped
image: 'docker.io/svenstaro/miniserve:latest'

The container starts successfully but the following is what's displayed..

17:32:51 [ERROR] Refusing to start as no explicit serve path was set and no interactive terminal was attached
17:32:51 [ERROR] Please set an explicit serve path like: miniserve /my/path
Error: Refusing to start as no explicit serve path was set and no interactive terminal was attached
Please set an explicit serve path like: miniserve /my/path

Any ideas?

Tks.
Tim.

Though I am not using this stack you could try to append the following to your miniserve service

    command: >-
      /tmp

This should serve the path you have mounted

If no interactive terminal is attached and not explicit path is given, miniserve will refuse to start for security reasons. I think the tip by @shemarmc should help in your case as that provides an explicit path. Please request to reopen if that doesn't help.