linuxserver / docker-hedgedoc

GNU General Public License v3.0
42 stars 7 forks source link

manage_users returns error #15

Closed ajitam closed 3 years ago

ajitam commented 3 years ago

linuxserver.io

if I run /opt/hedgedoc/bin/manage_users --add test@test.com returns

...
(node:336) UnhandledPromiseRejectionWarning: SequelizeConnectionRefusedError: connect ECONNREFUSED 127.0.0.1:5432
...

Expected Behavior

user test@test.com is created

Current Behavior

...
(node:336) UnhandledPromiseRejectionWarning: SequelizeConnectionRefusedError: connect ECONNREFUSED 127.0.0.1:5432
...

Steps to Reproduce

  1. exec into container
  2. run /opt/hedgedoc/bin/manage_users --add test@test.com

Environment

OS: ubuntu 18 CPU architecture: x86_64 How docker service was installed:

  hedgedoc_mariadb:
    image: ghcr.io/linuxserver/mariadb:latest
    restart: always
    volumes:
      - ./config:/config
    environment:
      - MYSQL_ROOT_PASSWORD=321
      - MYSQL_DATABASE=hedgedoc
      - MYSQL_USER=hedgedoc
      - MYSQL_PASSWORD=123
      - PGID=1000
      - PUID=1000
      - TZ=Europe/London

  hedgedoc:
    image: ghcr.io/linuxserver/hedgedoc:latest
    restart: always
    depends_on:
      - hedgedoc_mariadb
    volumes:
      - ./config:/config
    environment:
      - DB_HOST=hedgedoc_mariadb
      - DB_USER=hedgedoc
      - DB_PASS=123
      - DB_NAME=hedgedoc
      - DB_PORT=3306
      - PGID=1000
      - PUID=1000
      - TZ=Europe/London
      - CMD_ALLOW_ANONYMOUS=false

Command used to create docker container (run/create/compose/screenshot)

docker-compose up

github-actions[bot] commented 3 years ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

ajitam commented 3 years ago

I manage to solve this by setting DB with CMD variable

- CMD_DB_URL=mysql://hedgedoc:some-pass@hedgedoc_mariadb:3306/hedgedoc