Closed sglebs closed 8 years ago
This is how OpenShift chooses what to do for a Python app:
https://github.com/openshift/s2i-python/blob/master/3.3/s2i/bin/run
In other words, you can override env var APP_FILE , pointing at the file you need to run. So, for Python you can do it manually by including multiple .py files and tweaking APP_FILE.
In order to support a Procfile i a generic manner, perhaps the RUN phase could be overridden? See https://docs.openshift.org/latest/dev_guide/builds.html#override-builder-image-scripts and https://docs.openshift.org/latest/creating_images/s2i.html#s2i-scripts
Maybe our deployment script can add an extra synthetic file/script at the project's /s2i/bin/run which has the cmd-line in the Procfile? We would loop the lines in the Profile and, for each non-commented line, create an app under OpenShift and inject the cmd-line run script.
Unlike Heroku or dokku, OpenShift is a pain to support multiple command-lines for the same codebase. Example: WEB and CELERYD.