Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] mango.db is not persistent in the Docker Image #341

Open
LostOnTheLine opened this issue Oct 26, 2022 · 3 comments
Open

[Bug Report] mango.db is not persistent in the Docker Image #341

LostOnTheLine opened this issue Oct 26, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@LostOnTheLine
Copy link

Describe the bug
The Mango.db file defaults to a location that is not saved in the Docker-Compose provided with the Docker Image. It is saved in /root while it mounts /root/mango. If one does not change the location in the config file the database is lost on a restart. & then you have to delete the cache, & start from scratch, getting a new admin password & creating new users

To Reproduce
Steps to reproduce the behavior:
Run the docker as it's specified on DockerHub
Create a user
Add a manga
Stop the container/stack
Start the container/stack

Expected behavior
Your users are supposed to be kept between sessions

Environment (please complete the following information):

  • OS: Docker Desktop on Windows
  • Browser N/A
  • Mango Version: v0.27.0

Docker (if you are running Mango in a Docker container)

  • The docker-compose.yml file you are using, or your .env file.
version: '3'
services:
  mango:
    image: hkalexling/mango
    container_name: mango
    ports:
      - 9001:9000
    environment:
      - TZ=America/Phoenix    #Though this doesn't seem to work as the logs are still in GMT
    volumes:
      - /k/mango/mango:/root/mango
      - /k/mango/config:/root/.config/mango
      - /k/mango/mango.db:/root/mango.db    # This was added to fix the problem. optionally you could mount the whole "/Root" directory but it's already not ideal that the library & upload directories are within the mango directory where the queue.db & other persistent files live

Additional context
Add any other context about the problem here. Add screenshots if applicable.

@LostOnTheLine LostOnTheLine added the bug Something isn't working label Oct 26, 2022
@hkalexling
Copy link
Member

Yes it was a typo and has been fixed in #337. I am just too busy to make a proper release. Will do it this week. Keeping this issue opened for now until the release is out.

@Tzrlk
Copy link

Tzrlk commented Feb 15, 2023

I am just too busy to make a proper release.

I feel this in my bones.


The workaround (though this should be obvious):

  • Run up any configuration of the image without the database mounted.
  • Assume that the container name is "mango".
  • docker cp mango:/root/mango.db /opt/mango/mango.db
  • /opt/mango/mango.db:/root/mango/mango.db:rw
  • profit.

@hkmelee
Copy link

hkmelee commented Feb 19, 2024

or
cp /root/mango.db /root/.config/mango/
vi /root/.config/mango/config.yml
db_path: /root/.config/mango/mango.db
It FIX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants