taskwarrior-webui
taskwarrior-webui copied to clipboard
Cannot run taskwarrior-webui. Perhaps simply missing docu?
Hi, I would like to use taskwarrior-webui. However, when I run
sudo docker run -p 8080:80 --name taskwarrior-webui -v $HOME/.taskrc:/.taskrc -v $HOME/.task:/.task dcsunset/taskwarrior-webui
all I see is
> [email protected] start
> node ./dist/app.js
Server listening on http://0.0.0.0:3000
From the README it seems that this should be sufficient to run taskwarrior-webui
. Am I missing something?
Thanks in advance :)
Do you run the command above as root? If so, the problem is that $HOME will be the root's home (/root). Either run it as your user or map the volume accordingly.
I agree with @super-ben.
For docker,
# If your tw db is in a default path, use the result of `echo $HOME`.
TWDIR=<write your absolute path of them>
sudo docker run -p 8080:80 --name taskwarrior-webui -v $TWDIR/.taskrc:/.taskrc -v $TWDIR/.task:/.task dcsunset/taskwarrior-webui
But if you use podman, try :z
or :Z
labels. See the detail here.
For podman,
# without sudo
podman run -p 8080:80 --name taskwarrior-webui -v $HOME/.taskrc:/.taskrc:z -v $HOME/.task:/.task:z dcsunset/taskwarrior-webui
I agree with @super-ben.
For docker,
# If your tw db is in a default path, use the result of `echo $HOME`. TWDIR=<write your absolute path of them> sudo docker run -p 8080:80 --name taskwarrior-webui -v $TWDIR/.taskrc:/.taskrc -v $TWDIR/.task:/.task dcsunset/taskwarrior-webui
But if you use podman, try
:z
or:Z
labels. See the detail here.For podman,
# without sudo podman run -p 8080:80 --name taskwarrior-webui -v $HOME/.taskrc:/.taskrc:z -v $HOME/.task:/.task:z dcsunset/taskwarrior-webui
Thanks a lot @Constantin1489. This works in the sense, that I see
> [email protected] start
> node ./dist/app.js
Server listening on http://0.0.0.0:3000
However, I still see
Could it be there is some network issue when I am running the docker container as root? I believe the -p 8080:80
is supposed to make sure the ports are mapped correctly. But in my terminal I see 0.0.0.0:3000
, so I am guessing I am either publishing the wrong ports, or managing to run the container in such a way that I am not listening on the right port?
I would recommend adding your user to the docker group and running it from your home, so your mapping will be correct. If you wish, I can show you my “production” docker compose file.
I would recommend adding your user to the docker group and running it from your home, so your mapping will be correct. If you wish, I can show you my “production” docker compose file.
Thanks I will try it out
@mads-bisgaard, I found the real problem. Because you set your port to 8080, your URL is http://127.0.0.1:8080
. (docker run -p 8080:80
)
Yes, 3000 is the port of taskwarrior-webui in your docker container. Because you didn't map 3000 port to host port in your docker option(-p 8080:80
), you can't directly access your http://0.0.0.0:3000
. But port 80 forwards to port 3000. So http://127.0.0.1:8080
.
docker run -p 8080:80
: host(your computer) 8080 -> container 80 -> app 3000
According to podman-run manpage,
Mapping Ports for External Usage The exposed port of an application can be mapped to a host port using the -p flag. For example, an httpd port 80 can be mapped to the host port 8080 using the following: $ podman run -p 8080:80 -d -i -t fedora/httpd
Also, it seems that docker can use :z
labels, too.
Try this for docker. I believe this should work without any TWDIR
env variable.
docker run -p 8080:80 --name taskwarrior-webui -v $HOME/.taskrc:/.taskrc:z -v $HOME/.task:/.task:z dcsunset/taskwarrior-webui
See here
So, enter http://127.0.0.1:8080
.
If you already have other app uses port 8080, then use such a -p 8893:80
and enter http://127.0.0.1:8893
.
EDIT: 0.0.0.0 -> 127.0.0.1