Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1843058

Browse filesBrowse files
authored
feat: support user-defined scripts outside of docker image (#703)
1 parent bfc63d7 commit 1843058
Copy full SHA for 1843058

File tree

1 file changed

+9
-0
lines changed
Filter options

1 file changed

+9
-0
lines changed

‎pgml-extension/docker/entrypoint.sh

Copy file name to clipboardExpand all lines: pgml-extension/docker/entrypoint.sh
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ echo "Creating user and database..."
1515
echo "Installing pgml extension..."
1616
psql -U postgres -h 127.0.0.1 pgml_development -f sql/setup_examples.sql -P pager
1717

18+
19+
if [ -d "/docker-entrypoint-initdb.d" ]; then
20+
echo "Running custom scripts..."
21+
for f in /docker-entrypoint-initdb.d/*.sql; do
22+
echo "Running custom script ${f}"
23+
psql -U postgres -h 127.0.0.1 pgml_development -f "${f}"
24+
done
25+
fi
26+
1827
echo "Installing pgvector.. "
1928
psql -U postgres -h 127.0.0.1 pgml_development -c 'CREATE EXTENSION vector'
2029

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.