Merge branch 'postgres-11.7' into 'develop'

Fixed broken db with postgres:11.7

See merge request funkwhale/funkwhale!1035
This commit is contained in:
Eliot Berriot 2020-02-15 12:07:39 +01:00
commit 6d1e3f370a
4 changed files with 14 additions and 0 deletions

View File

@ -131,6 +131,7 @@ test_api:
DATABASE_URL: "postgresql://postgres@postgres/postgres"
FUNKWHALE_URL: "https://funkwhale.ci"
DJANGO_SETTINGS_MODULE: config.settings.local
POSTGRES_HOST_AUTH_METHOD: trust
only:
- branches
before_script:

View File

@ -56,3 +56,12 @@ from the server CLI. Typical use cases include:
All user-related commands are available under the ``python manage.py fw users`` namespace.
Please refer to the `Admin documentation <https://docs.funkwhale.audio/admin/commands.html#user-management>`_ for
more information and instructions.
Postgres docker changed environment variable [manual action required, docker only]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you're running with docker and our multi-container setup, there was a breaking change starting in the 11.7 postgres image (https://github.com/docker-library/postgres/pull/658)
You need to add this to your .env file: ``POSTGRES_HOST_AUTH_METHOD=trust``
Newer deployments aren't affected.

View File

@ -6,6 +6,8 @@ services:
networks:
- default
env_file: .env
environment:
- "POSTGRES_HOST_AUTH_METHOD=trust"
image: postgres:11
volumes:
- ./data/postgres:/var/lib/postgresql/data

View File

@ -23,6 +23,8 @@ services:
- .env.dev
- .env
image: postgres:${POSTGRES_VERSION-11}
environment:
- "POSTGRES_HOST_AUTH_METHOD=trust"
command: postgres ${POSTGRES_ARGS-}
volumes:
- "./data/${COMPOSE_PROJECT_NAME-node1}/postgres:/var/lib/postgresql/data"