Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • funkwhale funkwhale
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 413
    • Issues 413
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 17
    • Merge requests 17
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • funkwhalefunkwhale
  • funkwhalefunkwhale
  • Issues
  • #2036
Closed
Open
Issue created Jan 20, 2023 by Philipp Wolfer@phwGuest

Docker: Recent changes broke Postgres setup

Some recent changes have broken the database connection on docker setups when upgrading to 1.3rc1

  1. After upgrade the API container tries to connect with postgres on host localhost instead of postgres. Setting DATABASE_HOST=postgres in the .env file fixes this
  2. Connection to the server fails with django.db.utils.OperationalError: connection to server at "postgres" (172.19.0.7), port 5432 failed: FATAL: role "funkwhale" does not exist.

Not fully sure how to best address this, but here are my suggestions:

  1. Set DATABASE_HOST=postgres in the env.prod.sample file and document the change so users can adjust their existing .env file on upgrade
  2. Document how to add the "funkwhale" role to the existing postgres container. Obviously this cannot be done by a migration (due to the connection failing), so I assume this is a manual upgrade step

Correction: Actually it is all of the DATABASE_* variables that need different behaviour. So the default environment file should probably contain:

DATABASE_HOST=postgres
DATABASE_USER=postgres
DATABASE_NAME=postgres

to retain the old behaviour.

Edited Jan 20, 2023 by Philipp Wolfer
Assignee
Assign to
Time tracking