traggo / server

self-hosted tag-based time tracking
https://traggo.net
GNU General Public License v3.0
1.17k stars 57 forks source link

Initial login failing on Docker container #87

Closed losojos27 closed 3 years ago

losojos27 commented 3 years ago

Describe the bug After successfully starting the traggo/server Docker container using docker_compose, I am unable to login using the default credentials set. I have tried setting TRAGGO_DEFAULT_USER_NAME=admin and TRAGGO_DEFAULT_USER_PASS=admin as ENV variables in the yml file and mapping a volume containing server.ini with the TRAGGO_DEFAULT_USER_NAME=admin and TRAGGO_DEFAULT_USER_PASS=admin options set to /etc/traggo/

To Reproduce Steps to reproduce the behavior:

  1. Start Docker container using docker_compose according to the documentation:
version: "3.7"
services:
  traggo:
    image: traggo/server:latest
    ports:
      - 3030:3030
    environment:
      TRAGGO_DEFAULT_USER_NAME: "admin"
      TRAGGO_DEFAULT_USER_PASS: "mynewpassword"
    volumes:
      - ./traggodata:/opt/traggo/data
  1. Browse to the WebUI
  2. Attempt to login with admin/admin
  3. See error: Login failed: username/password combination does not exist

Expected behavior Successful login

Additional context Docker log output:

2021-02-18T16:37:10Z INF Traggo buildDate=2021-01-30T18:41:37Z buildMode=prod commit=e90db2337b60bc5433f876fd41f28111fbf0e756 version=0.2.0

2021-02-18T16:37:10Z INF Start listening port=3030

2021-02-18T16:37:42Z ERR GQL: mutation Login($name: String!, $pass: String!, $deviceType: DeviceType!) { login(username: $name, pass: $pass, deviceName: "web ui", type: $deviceType, cookie: true) { user { id name admin __typename } __typename } } error=["username/password combination does not exist"] took="510.377µs"
jmattheis commented 3 years ago

Try removing all the data in ./traggodata and try again with the credentials you've provided via env variables.

uniquegch commented 8 months ago

that worked for me (deleted the .db file in traggodata, which contained only that file) are there any restrictions for password usage in regards speical characters or what the first character can only be?

jmattheis commented 8 months ago

@uniquegch: No, no restrictions.