Closed ajitam closed 3 years ago
if I run /opt/hedgedoc/bin/manage_users --add test@test.com returns
/opt/hedgedoc/bin/manage_users --add test@test.com
... (node:336) UnhandledPromiseRejectionWarning: SequelizeConnectionRefusedError: connect ECONNREFUSED 127.0.0.1:5432 ...
user test@test.com is created
test@test.com
exec
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
docker-compose up
Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!
I manage to solve this by setting DB with CMD variable
CMD
- CMD_DB_URL=mysql://hedgedoc:some-pass@hedgedoc_mariadb:3306/hedgedoc
if I run
/opt/hedgedoc/bin/manage_users --add test@test.com
returnsExpected Behavior
user
test@test.com
is createdCurrent Behavior
Steps to Reproduce
exec
into container/opt/hedgedoc/bin/manage_users --add test@test.com
Environment
OS: ubuntu 18 CPU architecture: x86_64 How docker service was installed:
Command used to create docker container (run/create/compose/screenshot)
docker-compose up