Skip to content

Commit 6b23b9a

Browse files
committed
entrypoint use POD_INSTANCE instead of hostname
1 parent 7cd8fa5 commit 6b23b9a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

dockerfile-dev-with-volumes/pod/my-entrypoint.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
#!/bin/sh
2-
echo "Launching commands into pod-dev"
2+
INSTANCE="${POD_INSTANCE:-pod}"
3+
echo "Launching commands into ${INSTANCE}-dev"
34
mkdir -p pod/node_modules
45
mkdir -p pod/db_migrations && touch pod/db_migrations/__init__.py
56
ln -fs /tmp/node_modules/* pod/node_modules
67
# Mise en route
78
# Base de données SQLite intégrée
8-
INIT_FILE="/usr/src/app/pod/.${HOSTNAME}.initialized"
9+
INIT_FILE="/usr/src/app/pod/.${INSTANCE}.initialized"
910
if test ! -f "$INIT_FILE"; then
1011
echo "$INIT_FILE does not exist."
1112
python3 manage.py create_pod_index
12-
curl -XGET "elasticsearch.localhost:9200/${HOSTNAME}/_search"
13+
curl -XGET "elasticsearch.localhost:9200/${INSTANCE}/_search"
1314
# Deployez les fichiers statiques
1415
python3 manage.py collectstatic --no-input --clear --verbosity 0
1516
# Lancez le script présent à la racine afin de créer les fichiers de migration, puis de les lancer pour créer la base de données SQLite intégrée.

0 commit comments

Comments
 (0)