Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D docker-wallabag-ldap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Michał Woźniak
  • docker-wallabag-ldap
  • Issues
  • #2
Closed
Open
Created Apr 20, 2019 by Michał Woźniak@rysiekOwner1 of 1 task completed1/1 task

Don't create the `wallabag` default user

Currently, because we are running wallabag:install, a default user (wallabag) with a default password (wallabag) gets automagically created. That's not great for two reasons:

  • because the user needs to be then removed for security reasons (an unused user account with a default password... not great!)
  • and because when restarting the container, we get error messages (see below); errors are being ignored and Wallabag runs ok, but that's still not great.

Solution options:

  • wait untill relevant migrations are in master branch of wallabag and then remove wallabag:install invocation;
    • this would most probably happen only when the 2.4 branch gets merged into master;
  • switch to 2.4 branch and remove wallabag:install invocation;
    • would require a lot of work and a dedicated fork, since the patch does not get applied cleanly;
  • manually pull the relevant migrations from the 2.4 branch and apply them, and remove wallabag:install invocation;
    • a patch could be generated from the relevant fix branch, looks like it's literally just creating a single file;
  • in entrypoint.sh check if the database is empty, and only then run wallabag:install, removing the wallabag user afterwards
    • far from elegant.

Error messages:

wallabag_1        | Step 3 of 4: Administration setup.
wallabag_1        | ----------------------------------
wallabag_1        | 
wallabag_1        | 
wallabag_1        |                                                                                
wallabag_1        |   [Doctrine\DBAL\Exception\UniqueConstraintViolationException]                 
wallabag_1        |   An exception occurred while executing 'INSERT INTO "wallabag_user" (usernam  
wallabag_1        |   e, username_canonical, email, email_canonical, enabled, salt, password, las  
wallabag_1        |   t_login, confirmation_token, password_requested_at, roles, id, name, dn, cr  
wallabag_1        |   eated_at, updated_at, authCode, twoFactorAuthentication, trusted) VALUES (?  
wallabag_1        |   , ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["wall  
wallabag_1        |   abag", "wallabag", "", "", 1, "tRfuh2hltig0Jnkwhtkr\/9GjwuCDp5j68aSqdm0dw4I  
wallabag_1        |   ", "QmylEeeTkc\/Xma9GjYaDsR73vU5n8oTZf45unWG8KAy8789TaKr0Huq4QypM7lXBxYwlgw  
wallabag_1        |   MbzHaqUZTIJueaCg==", null, null, null, "a:2:{i:0;s:9:\"ROLE_USER\";i:1;s:16  
wallabag_1        |   :\"ROLE_SUPER_ADMIN\";}", 3, null, null, "2019-04-20 15:21:11", "2019-04-20  
wallabag_1        |    15:21:11", null, 0, null]:                                                  
wallabag_1        |                                                                                
wallabag_1        |   SQLSTATE[23505]: Unique violation: 7 ERROR:  duplicate key value violates u  
wallabag_1        |   nique constraint "uniq_1d63e7e592fc23a8"                                     
wallabag_1        |   DETAIL:  Key (username_canonical)=(wallabag) already exists.                 
wallabag_1        |                                                                                
wallabag_1        | 
wallabag_1        |                                                                                
wallabag_1        |   [Doctrine\DBAL\Driver\PDOException]                                          
wallabag_1        |   SQLSTATE[23505]: Unique violation: 7 ERROR:  duplicate key value violates u  
wallabag_1        |   nique constraint "uniq_1d63e7e592fc23a8"                                     
wallabag_1        |   DETAIL:  Key (username_canonical)=(wallabag) already exists.                 
wallabag_1        |                                                                                
wallabag_1        | 
wallabag_1        |                                                                                
wallabag_1        |   [PDOException]                                                               
wallabag_1        |   SQLSTATE[23505]: Unique violation: 7 ERROR:  duplicate key value violates u  
wallabag_1        |   nique constraint "uniq_1d63e7e592fc23a8"                                     
wallabag_1        |   DETAIL:  Key (username_canonical)=(wallabag) already exists.  
Edited Apr 20, 2019 by Michał Woźniak
Assignee
Assign to
Time tracking