Skip to content

Commit b65a5cf

Browse files
authored
feat: support user-defined scripts outside of docker image (#703)
1 parent f2fe062 commit b65a5cf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pgml-extension/docker/entrypoint.sh

Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy