getmango / Mango

Mango is a self-hosted manga server and web reader
https://getmango.app
MIT License
1.71k stars 123 forks source link

[Bug Report] ~ is not expand when using docker-compose #277

Closed ipfans closed 2 years ago

ipfans commented 2 years ago

Describe the bug

I am using docker-compose to deploy v0.24.0 of mango. When I follow the steps in README and used the configuration file in the README.md file, I found that the config.yml file can be read normally, but the mango data folder is always empty.

When checking the log outputs, I found that the logs show that the ~/mango folder does not exist, then mango created a /~/mango directory instead of using the /root directory.

But when I replace ~ with /root in the config, mango can recognize that the directory exists and write data.

To Reproduce

mkdir config mango
vim config/config.yml
docker-compose up

Expected behavior

mango directory should not be empty

Environment (please complete the following information):

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

version: '3'

services:
  mango:
    image: hkalexling/mango
    container_name: mango
    expose:
      - 9000
    ports:
      - 127.0.0.1:9000:9000
    volumes:
      - ./mango:/root/mango
      - ./config:/root/.config/mango

Additional context

host: 0.0.0.0
port: 9000
base_url: /
session_secret: mango-session-secret
library_path: ~/mango/library
db_path: ~/mango/mango.db
scan_interval_minutes: 5
thumbnail_generation_interval_hours: 24
log_level: info
upload_path: ~/mango/uploads
plugin_path: ~/mango/plugins
download_timeout_seconds: 30
library_cache_path: ~/mango/library.yml.gz
cache_enabled: true
cache_size_mbs: 100
cache_log_enabled: false
disable_login: false
default_username: "admin"
auth_proxy_header_name: ""
mangadex:
  base_url: https://mangadex.org
  api_url: https://api.mangadex.org/v2
  download_wait_seconds: 5
  download_retries: 4
  download_queue_db_path: ~/mango/queue.db
  chapter_rename_rule: '[Vol.{volume} ][Ch.{chapter} ]{title|id}'
  manga_rename_rule: '{title}'
mango-assistant[bot] commented 2 years ago

Hi there! The issue has been fixed in v0.25.0. Thanks for the bug report!