Add option to run python scripts in entrypoint (#459)

* add option to also run python scripts
pull/461/head
mazano 2023-10-23 17:27:18 +02:00 zatwierdzone przez GitHub
rodzic 8d5482c134
commit 249de77ce6
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -526,7 +526,7 @@ By default, the lockfile is generated in `/docker-entrypoint-initdb.d` but it ca
-v /data:/data
```
Currently, you can pass `.sql`, `.sql.gz` and `.sh` files as mounted volumes.
Currently, you can pass `.sql`, `.sql.gz`, `.py` and `.sh` files as mounted volumes.
```shell
docker run -d -v `pwd`/setup-db.sql:/docker-entrypoint-initdb.d/setup-db.sql kartoza/postgis

Wyświetl plik

@ -474,6 +474,7 @@ function entry_point_script {
done
fi;;
*.sh) echo "$0: running $f"; . "$f" || true;;
*.py) echo "$0: running $f"; python3 "$f" || true;;
*) echo "$0: ignoring $f" ;;
esac
echo