Skip to content

Remove call to update_db.pl from Dockerfiles #457

@sekjal

Description

@sekjal

Describe the issue
The last layer of the Docker deployments has a call to both installer/update_db.pl AND plackup. While this makes sense in some ways (verify the DB and the container are in sync), it has a couple problems:

  1. When deploying multiple replicas, there is a race condition between the replicas to do a database upgrade, which may result in crashes/failures if creating/updating tables.
  2. Not every instance of the container needs to be running the web server; sometimes you just want to do the initial setup, or run the crons.
  3. in the Alpine image, there appears to be an intermittent issue about SSL not being supported; the unit tests addressed this by giving more time for the container to start up before, but the underlying cause seems tied to update_db.pl

Proposed solution
Remove the update_db.pl call but keep plackup. This means you'll get a running instance of Libki Server on 'up', but you may need to run some setup (create_instance, create_user, update_db, etc) either manually in the container or programmatically through docker-compose and one-time containers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions