-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: make run.sh customizable #112
Comments
This is a really good idea, I would want to keep run.sh stand-alone with a
check and run for a /run/customisation.sh script or something like that
That way as we update the image and run file the user wouldn’t have to keep
changing their script
Do you fancy make a PR for this? If not I can try and take a look at some
point 😂
On Sun, 22 Nov 2020 at 08:44, grhangelone ***@***.***> wrote:
Hi there,
I really like this project, thanks for everything :)
I have 3 containers running as service in my docker cluster and they work
perfectly.
You just have to have a nfs volume on all nodes to store the bind mounts
on.
like:
docker service create --name lamp_nextcloud -p "84:80"
--mount type=bind,source=/mnt/nfs/lamp_nextcloud/app,destination=/app
--mount
type=bind,source=/mnt/nfs/lamp_nextcloud/mysql,destination=/var/lib/mysql
mattrayner/lamp:latest
the /mnt/nfs directoy is a mounted nfs share from my fileserver
Now to my request:
I do have 1 web container, where I would like to have cron running and a
crontab for root in place.
Currently I do have to set this up manually on every container restart.
I would be perfect, if we could edit the run.sh and make it persistent.
I'm thinking of:
- create a folder /run
- rename the current /run.sh to /run.supplied
- check if there is a run.sh in the /run folder
- if not, copy the /run.supplied to /run/run.sh
- execute /run/run.sh
This way, we can bindmount the /run folder in our containers and have our
own run.sh in place.
In my case this would be the same as the supplied but with an echo into
the crontab file and a cron service start
Or:
At the end of the supplied run.sh as it currently is do a
[ -x /run/execute.sh ] && /run/execute.sh
This way we can still bindmount our "startup folder" and add commands for
the container start
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#112>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2XGNQQSD6AHNPY3QJAKHTSRDFN7ANCNFSM4T6KZVOA>
.
--
Matt Rayner
http://www.mattrayner.co.uk/
|
I would love to, but I'm not sure how to do this :) |
This was referenced Nov 23, 2020
Hi Matt, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
I really like this project, thanks for everything :)
I have 3 containers running as service in my docker cluster and they work perfectly.
You just have to have a nfs volume on all nodes to store the bind mounts on.
like:
docker service create --name lamp_nextcloud -p "84:80"
--mount type=bind,source=/mnt/nfs/lamp_nextcloud/app,destination=/app
--mount type=bind,source=/mnt/nfs/lamp_nextcloud/mysql,destination=/var/lib/mysql
mattrayner/lamp:latest
the /mnt/nfs directoy is a mounted nfs share from my fileserver
Now to my request:
I do have 1 web container, where I would like to have cron running and a crontab for root in place.
Currently I do have to set this up manually on every container restart.
/edit better way
At the end of the supplied run.sh as it currently is do a
[ -x /run/execute.sh ] && /run/execute.sh
This way we can bindmount our /run "startup folder" and add commands for the container start
In my case this would be an echo into the crontab file and a cron service start
The text was updated successfully, but these errors were encountered: