- Add the GPL-3.0 LICENSE and SPDX headers to peo4c's own files. - Add THIRD_PARTY_NOTICES.md listing every bundled component, its license and where its license text lives in the image, plus a trademark disclaimer; reference it from the README. - Ship neo4j-browser's LICENSE, NOTICE.txt and LICENSES.txt with a source archive of the built commit, as the GPL requires. - Ship Apache AGE's LICENSE and NOTICE, which the base image lacks. - Collect license texts for Python packages whose wheels omit them, from PyPI sdists or vendored copies in docker/licenses/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
999 B
Bash
Executable File
21 lines
999 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# SPDX-FileCopyrightText: 2026 Bart Broere
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
# Prepares a freshly initialised cluster for peo4c.
|
|
set -euo pipefail
|
|
|
|
# The bridge connects over 127.0.0.1 with the credentials users log in with, so
|
|
# loopback TCP connections must check passwords. The postgres image trusts them
|
|
# by default; Unix-socket connections (psql inside the container) stay trusted.
|
|
sed -i -E 's/^(host[[:space:]]+[^[:space:]]+[[:space:]]+[^[:space:]]+[[:space:]]+(127\.0\.0\.1\/32|::1\/128)[[:space:]]+)trust/\1scram-sha-256/' \
|
|
"$PGDATA/pg_hba.conf"
|
|
|
|
# Create the default AGE graph that neo4j-browser opens on first connect.
|
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "${POSTGRES_DB:-$POSTGRES_USER}" \
|
|
-v graph="${PEO4C_DEFAULT_GRAPH:-neo4j}" <<'EOSQL'
|
|
LOAD 'age';
|
|
SET search_path = ag_catalog, "$user", public;
|
|
SELECT ag_catalog.create_graph(:'graph')
|
|
WHERE NOT EXISTS (SELECT 1 FROM ag_catalog.ag_graph WHERE name = :'graph');
|
|
EOSQL
|