Entrypoint scripts help #359
-
Hello everyone, I've been trying to play around with this repo (Cool one, btw.), to see how it works with Laravel and so far I kinda got stuck on understanding entrypoint.d scripts. Still in process of learning docker... Let's assume I have a few small .sh scripts that should run on container start and that the default one "laravel-automations" is/will be disabled. Can anyone help me realize how to handle this using s6-init and without s6, using only entrypoint? I would like to know how, if possible, to wait until all of the entrypoint.d scripts are finished to start the container / nginx / fpm? Unless I'm mistaken / went down the wrong path. Because during the execution of the custom scripts I get messages like this randomly spread out:
Dockerfile:
Thanks for help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
I think I understand your question, but please rephrase your question if I didn't answer correctly.
Make sure you have all scripts in order. You can see our scripts by running
So if you want your scripts to run after ours, just start them with any number greater than 50. More information here: https://serversideup.net/open-source/docker-php/docs/customizing-the-image/adding-your-own-start-up-scripts#choose-your-execution-order |
Beta Was this translation helpful? Give feedback.
Oh, I see now.
With those advanced dependencies, you might want to write your own service script: https://github.com/just-containers/s6-overlay/tree/master#writing-a-service-script
You wont need to use my
docker-php-serversideup-s6-init
. You can see how I structured my services here: https://github.com/serversideup/docker-php/tree/main/src/variations/fpm-nginx/etc/s6-overlay/s6-rc.d/nginx