Fixed broken db with postgres:11.7

merge-requests/1042/head
Eliot Berriot 2020-02-15 12:01:19 +01:00
rodzic 22c0285680
commit 4b2b250047
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6B501DFD73514E14
4 zmienionych plików z 14 dodań i 0 usunięć

Wyświetl plik

@ -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:

Wyświetl plik

@ -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.

Wyświetl plik

@ -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

Wyświetl plik

@ -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"