This is an idea to have options to run a command on fig up
/ fig stop
so script have a chance to do some prep.
e.g.:
pre-command: cp /root/.ssh/id_rsa .
post-command: do some cleanup, send email notification, etc.
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
What do you think?
The pre-command
and post-command
will be run on host machine, not container.
See #74 and #429 for similar.
Why not just wrap the fig command in a bash script, or some other build tool? make, tox, rake, there are already many for every language
Yes, I did using makefile but I think It is nice if Fig can handle it out of box.
No, run something on host machine - is bead idea.
Someone can use configs from antonymous users.
-1
Thanks for the feature suggestion!
I think this is a duplicate of #1341
I think we're going to enable this with #1510 instead.
Most helpful comment
No, run something on host machine - is bead idea.
Someone can use configs from antonymous users.
-1