BaldissaraMatheus / Tasks.md

A self-hosted, Markdown file based task management board
https://hub.docker.com/r/baldissaramatheus/tasks.md
MIT License
474 stars 15 forks source link

All tasks missing #90

Closed imlogang closed 5 months ago

imlogang commented 5 months ago

It seems that a couple of days ago, Tasks was updated to 2.0 and now all of the sudden all of my tasks are missing but still present in the Docker container.

I noticed a new file structure from issue #48 and what is now present on the readme. https://github.com/BaldissaraMatheus/Tasks.md?tab=readme-ov-file#docker-compose

My docker compose file:

version: "3.3"
services:
  tasks.md:
    container_name: tasks.md
    environment:
      - PUID=1000
      - PGID=1000
      - TITLE=Tasks
    ports:
      - 8080:8080
    volumes:
      - ~/tasks/files:/tasks
      - ~/tasks/config:/config/
    restart: unless-stopped
    image: baldissaramatheus/tasks.md
networks: {}

I can see these files still present on my local Machine.

:~/tasks/files$ ls
 Backlog   Blocked   Doing   Done  'Up Next'  'Wont Do'

But seem to not be present on the Docker Container itself.

/tasks # ls
/tasks #

Am I doing something wrong? Since the files are still present locally, should I just recreate my tasks under the new 2.x?

FWIW, I do not see a directory under ~/tasks/config yet but that might be because I haven't created anything since I saw it had nothing there anymore.

BaldissaraMatheus commented 5 months ago

I sorry it broke for you, did your container update automatically? I thought changing the major number in the version would prevent it to happen.

I don't see any issues in your compose file, it should be working properly.

Try to do the following:

  1. Backup the folders under ~/tasks/files to ~/tasks-backup
  2. delete ~/tasks, create it again manually and leave it empty
  3. recreate the container with the compose file you posted here
  4. check if the directory ~/tasks/files was created
  5. then move everything under ~/tasks-backup to ~/tasks/files

If it doesn't work, please check the container logs (with docker logs containerId) and post it here.

FWIW, I do not see a directory under ~/tasks/config yet but that might be because I haven't created anything since I saw it had nothing there anymore

It's fine, if the config volume was properly mapped the container should be able to create it by itself

imlogang commented 5 months ago

Thanks for getting back to me so quickly!

So, I moved ~/tasks/files to ~/task_backup here:

$ ls ~/task_backup/
 Backlog   Blocked   Doing   Done  'Up Next'  'Wont Do'

Then rm'd ~/tasks and created a new ~/tasks and started (previously stopped) the same compose file and nothing is there still :(.

 ls -la ~/tasks
total 8
drwxrwxr-x  2 logan logan 4096 Feb 15 21:52 .
drwxr-x--- 35 logan logan 4096 Feb 15 21:52 ..

And it seems somehow that there are no logs 🤔

$ docker container ls | grep tasks.md
c1a502127ffe   baldissaramatheus/tasks.md                                       "/bin/sh -c 'mkdir -…"   22 hours ago   Up 3 minutes            0.0.0.0:8080->8080/tcp, :::8080->8080/tcp                                                                                                                                                                                                                                                      tasks.md
logan@docker:~/tasks$ docker logs tasks.md

(docker container ls to show it is running.)

Even doing the container ID I get nothing.

logan@docker:~/tasks$ docker logs tasks.md
logan@docker:~/tasks$ docker container logs c1a502127ffe
logan@docker:~/tasks$ docker logs c1a502127ffe 

My only thing I might thing is weird is the - PUID/PGID=1000 but I have confirmed that's my user that's my user.

And..... After typing all of this. It seems my issue was with dockge. (reference) Originally, I started tasks with a docker run ... command and when I saw it was broken, tried switching to Dockge as I had just installed it but either it is messing with permissions or something else is going on, starting it from the docker compose file it gave me in my CMD it worked fine. I want to leave the wall of text before hand for anyone else who runs into this though.

Moving files back to ~/tasks/files works perfectly now. Thanks!