When does prestart.sh run and where is defined? #1811
Answered
by
YuriiMotov
movaldivia
asked this question in
Questions
|
When does prestart.sh run and where is defined? Any recommendation for development purposes on how to create the super-admin? |
Answered by
YuriiMotov
Sep 1, 2025
Replies: 3 comments
|
I was also trying to understand this magically called prestart script, and after some digging, I found that it is defined in the base docker image |
0 replies
|
Here's the origin in case anyone else is interested. # ...
# If there's a prestart.sh script in the /app directory or other path specified, run it before starting
PRE_START_PATH=${PRE_START_PATH:-/app/prestart.sh}
echo "Checking for script in $PRE_START_PATH"
if [ -f $PRE_START_PATH ] ; then
echo "Running script $PRE_START_PATH"
. "$PRE_START_PATH"
else
echo "There is no script $PRE_START_PATH"
fi
# ...Sweet script. |
0 replies
|
In current version it's run by prestart service: docker-compose.yml prestart:
image: '${DOCKER_IMAGE_BACKEND?Variable not set}:${TAG-latest}'
build:
context: ./backend
networks:
- traefik-public
- default
depends_on:
db:
condition: service_healthy
restart: true
command: bash scripts/prestart.sh # <--- HERE |
0 replies
Answer selected by
YuriiMotov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In current version it's run by prestart service:
docker-compose.yml