Skip to content

Commit ce2563b

Browse files
author
Gabriel Monroy
committed
import profile.d/*.sh into shell environment on deis run
1 parent 1e40f76 commit ce2563b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

api/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,9 @@ def run(self, *args, **kwargs):
643643
['-v',
644644
'/opt/deis/runtime/slugs/{formation_id}-{version}/app:/app'.format(**locals()),
645645
release.image])
646+
base_cmd = "export HOME=/app; cd /app && for profile in " \
647+
"`find /app/.profile.d/*.sh -type f`; do . $profile; done"
648+
command = "/bin/sh -c '{base_cmd} && {command}'".format(**locals())
646649
args = list(self._prepare_converge_args()) + [docker_args] + [command]
647650
task = tasks.run_node.subtask(args)
648651
return task.apply_async().wait()

0 commit comments

Comments
 (0)