Leantime / docker-leantime

Official Docker Image for Leantime https://leantime.io
GNU Affero General Public License v3.0
190 stars 86 forks source link

No database connection, check your database credentials in your configuration file. #43

Closed modem7 closed 2 years ago

modem7 commented 2 years ago

Getting the above error, not quite sure where the issue is, doesn't seem to be much in terms of logs.

  ##~~~~~~~~##
 ##Leantime##
 ##~~~~~~~~##

  leantime_web:
    image: leantime/leantime
    container_name: Leantime
    hostname: Leantime
    environment:
      - LEAN_DB_HOST="LeantimeDB"
      - LEAN_DB_USER="admin"
      - LEAN_DB_PASSWORD="dbpass"
      - LEAN_DB_DATABASE="leantime"
    networks:
      pihole:
        ipv4_address: '172.22.0.142'
      isolated:
    expose:
      - "9000"
      - "80"
      - "443"
    depends_on:
      - leantime_db
    labels: 
      # - backup
      - autoheal=true
      - "traefik.enable=true"
      ## HTTP Routers
      - "traefik.http.routers.leantime-rtr.entrypoints=https"
      - "traefik.http.routers.leantime-rtr.rule=Host(`leantime.$DOMAINNAME`)"
      - "traefik.http.routers.leantime-rtr.tls=true"
      ## Middlewares
      - "traefik.http.routers.leantime-rtr.middlewares=chain-no-auth@file" # No Authentication
      # - "traefik.http.routers.leantime-rtr.middlewares=chain-basic-auth@file" # Basic Authentication
      # - "traefik.http.routers.leantime-rtr.middlewares=chain-oauth@file" # Google OAuth 2.0
      # - "traefik.http.routers.leantime-rtr.middlewares=chain-authelia@file" # Authelia
      ## HTTP Services
      - "traefik.http.routers.leantime-rtr.service=leantime-svc"
      - "traefik.http.services.leantime-svc.loadbalancer.server.port=80"
      ## Flame Dashboard
      - flame.type=application # "app" works too
      - flame.name=leantime
      - flame.icon=https://raw.githubusercontent.com/modem7/MiscAssets/master/Icons/leantime-logo.png # Optional, default is "docker"

  leantime_db:
    image: linuxserver/mariadb:alpine
    container_name: LeantimeDB
    hostname: LeantimeDB
    volumes:
      - $USERDIR/Leantime/DB:/config
    restart: always
    environment:
      - PUID=$PUID
      - PGID=$PGID
      - TZ=$TZ
      - MYSQL_ROOT_PASSWORD="rootpass"
      - MYSQL_DATABASE="leantime"
      - MYSQL_USER="admin"
      - MYSQL_PASSWORD="dbpass"
    networks:
      - isolated
    expose:
      - "3306"

Log from Leantime:

today at 01:17:34 Creating configuration file!
today at 01:17:34 2022-02-07 01:17:34,798 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
today at 01:17:34 2022-02-07 01:17:34,802 INFO supervisord started with pid 14
today at 01:17:35 2022-02-07 01:17:35,806 INFO spawned: 'httpd' with pid 16
today at 01:17:35 2022-02-07 01:17:35,808 INFO spawned: 'php-fpm' with pid 17
today at 01:17:35 [07-Feb-2022 01:17:35] NOTICE: fpm is running, pid 17
today at 01:17:35 [07-Feb-2022 01:17:35] NOTICE: ready to handle connections
today at 01:17:36 2022-02-07 01:17:36,864 INFO success: httpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
today at 01:17:36 2022-02-07 01:17:36,865 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
today at 01:18:03 127.0.0.1 -  07/Feb/2022:01:17:58 +0000 "GET /index.php" 200
today at 01:18:15 127.0.0.1 -  07/Feb/2022:01:18:10 +0000 "GET /index.php" 200

Log from DB:

today at 01:16:21 [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
today at 01:16:21 [s6-init] ensuring user provided files have correct perms...exited 0.
today at 01:16:21 [fix-attrs.d] applying ownership & permissions fixes...
today at 01:16:21 [fix-attrs.d] done.
today at 01:16:21 [cont-init.d] executing container initialization scripts...
today at 01:16:21 [cont-init.d] 01-envfile: executing... 
today at 01:16:21 [cont-init.d] 01-envfile: exited 0.
today at 01:16:21 [cont-init.d] 02-tamper-check: executing... 
today at 01:16:21 [cont-init.d] 02-tamper-check: exited 0.
today at 01:16:21 [cont-init.d] 10-adduser: executing... 
today at 01:16:21
today at 01:16:21 -------------------------------------
today at 01:16:21          _         ()
today at 01:16:21         | |  ___   _    __
today at 01:16:21         | | / __| | |  /  \
today at 01:16:21         | | \__ \ | | | () |
today at 01:16:21         |_| |___/ |_|  \__/
today at 01:16:21
today at 01:16:21
today at 01:16:21 Brought to you by linuxserver.io
today at 01:16:21 -------------------------------------
today at 01:16:21
today at 01:16:21 To support LSIO projects visit:
today at 01:16:21 https://www.linuxserver.io/donate/
today at 01:16:21 -------------------------------------
today at 01:16:21 GID/UID
today at 01:16:21 -------------------------------------
today at 01:16:21
today at 01:16:21 User uid:    1000
today at 01:16:21 User gid:    997
today at 01:16:21 -------------------------------------
today at 01:16:21
today at 01:16:21 [cont-init.d] 10-adduser: exited 0.
today at 01:16:21 [cont-init.d] 30-config: executing... 
today at 01:16:22 [cont-init.d] 30-config: exited 0.
today at 01:16:22 [cont-init.d] 40-initialise-db: executing... 
today at 01:16:22 [cont-init.d] 40-initialise-db: exited 0.
today at 01:16:22 [cont-init.d] 90-custom-folders: executing... 
today at 01:16:22 [cont-init.d] 90-custom-folders: exited 0.
today at 01:16:22 [cont-init.d] 99-custom-files: executing... 
today at 01:16:22 [custom-init] no custom files found exiting...
today at 01:16:22 [cont-init.d] 99-custom-files: exited 0.
today at 01:16:22 [cont-init.d] done.
today at 01:16:22 [services.d] starting services
today at 01:16:22 [services.d] done.
today at 01:16:22 220207 01:16:22 mysqld_safe Logging to '/config/databases/LeantimeDB.err'.
today at 01:16:22 220207 01:16:22 mysqld_safe Starting mariadbd daemon with databases from /config/databases
marcelfolaron commented 2 years ago

The password you use to create the database is not the same as the one you use to connect them.

dbpass vs a6k...

On Sun, Feb 6, 2022, 8:21 PM modem7 @.***> wrote:

Getting the above error, not quite sure where the issue is, doesn't seem to be much in terms of logs.

~~~~

Leantime

~~~~

leantime_web: image: leantime/leantime container_name: Leantime hostname: Leantime environment:

  • LEAN_DB_HOST="LeantimeDB"
  • LEAN_DB_USER="admin
  • LEAN_DB_PASSWORD="dbpass"
  • LEAN_DB_DATABASE="leantime" networks: pihole: ipv4_address: '172.22.0.142' isolated: expose:
  • "9000"
  • "80"
  • "443" depends_on:
  • leantime_db labels:

    - backup

  • autoheal=true
  • "traefik.enable=true"

    HTTP Routers

  • "traefik.http.routers.leantime-rtr.entrypoints=https"
  • "traefik.http.routers.leantime-rtr.rule=Host(leantime.$DOMAINNAME)"
  • "traefik.http.routers.leantime-rtr.tls=true"

    Middlewares

  • @.***" # No Authentication

    - @.***" # Basic Authentication

    - @.***" # Google OAuth 2.0

    - @.***" # Authelia

    HTTP Services

  • "traefik.http.routers.leantime-rtr.service=leantime-svc"
  • "traefik.http.services.leantime-svc.loadbalancer.server.port=80"

    Flame Dashboard

  • flame.type=application # "app" works too
  • flame.name=leantime
  • flame.icon=https://raw.githubusercontent.com/modem7/MiscAssets/master/Icons/leantime-logo.png # Optional, default is "docker"

    leantime_db: image: linuxserver/mariadb:alpine container_name: LeantimeDB hostname: LeantimeDB volumes:

  • $USERDIR/Leantime/DB:/config restart: always environment:
  • PUID=$PUID
  • PGID=$PGID
  • TZ=$TZ
  • MYSQL_ROOT_PASSWORD="rootpas"
  • MYSQL_DATABASE="leantime"
  • MYSQL_USER="dbpass"
  • MYSQL_PASSWORD="a6KzwNquomXDNR" networks:
  • isolated expose:
  • "3306"

— Reply to this email directly, view it on GitHub https://github.com/Leantime/docker-leantime/issues/43, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALG4EFVMFVWYE67EDIZMXBTUZ4NA5ANCNFSM5NWDJRVQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

modem7 commented 2 years ago

Oops, that was a c+p issue. Apologies.

Edited original post for better clarity.

I've attempted to make both root and db passwords the same just in case, but no go.

The password you use to create the database is not the same as the one you use to connect them.

dbpass vs a6k...