When does prestart.sh run and where is defined? #1811
-
When does prestart.sh run and where is defined? Any recommendation for development purposes on how to create the super-admin? |
Beta Was this translation helpful? Give feedback.
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 |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
In current version it's run by prestart service:
docker-compose.yml