You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The base Docker image here seems to be hard-coded to only look for the specific entrypoint.sh script in the root directory, which in turn seems to only be able to look for the start_service.sh script, also in the root directory.
This makes it very hard to use this Docker image with Flask apps stored in a different repository/directory structure. Unlike the equivalent R Shiny Docker image, which can easily be pointed at any R Shiny file/directory within a repo, deploying a service in Platform with this image will give error messages like: ./entrypoint.sh: line 7: ./start_service.sh: No such file or directory
even when there is a start_service.sh at the specified path.
Including a start_service.sh file in the root directory of the repository instead gives this error: ./entrypoint.sh: line 7: ./start_service.sh: Permission denied
Note that the error messages appear to be the same no matter what value is given for the PATH parameter in the Platform Service interface -- it says "No such file" if the file is not in the root directory, and "Permission denied" if it is.
Impact
This makes it very hard to create custom or lightweight Flask applications to try and take advantage of this service template in Platform. It would be preferable to have something much more like the R Shiny approach, where there is a template app you can work off of, or you can just use code from whatever repository you like in GitHub, so long as the PATH points to where to find some initialization script.
Possible cause
It looks like maybe something about the APP_DIR is being hard-coded instead of passed as an environmental variable from the Platform Service.
The base Docker image here seems to be hard-coded to only look for the specific
entrypoint.sh
script in the root directory, which in turn seems to only be able to look for thestart_service.sh
script, also in the root directory.This makes it very hard to use this Docker image with Flask apps stored in a different repository/directory structure. Unlike the equivalent R Shiny Docker image, which can easily be pointed at any R Shiny file/directory within a repo, deploying a service in Platform with this image will give error messages like:
./entrypoint.sh: line 7: ./start_service.sh: No such file or directory
even when there is a
start_service.sh
at the specified path.Including a
start_service.sh
file in the root directory of the repository instead gives this error:./entrypoint.sh: line 7: ./start_service.sh: Permission denied
Note that the error messages appear to be the same no matter what value is given for the
PATH
parameter in the Platform Service interface -- it says "No such file" if the file is not in the root directory, and "Permission denied" if it is.Impact
This makes it very hard to create custom or lightweight Flask applications to try and take advantage of this service template in Platform. It would be preferable to have something much more like the R Shiny approach, where there is a template app you can work off of, or you can just use code from whatever repository you like in GitHub, so long as the PATH points to where to find some initialization script.
Possible cause
It looks like maybe something about the APP_DIR is being hard-coded instead of passed as an environmental variable from the Platform Service.
civis-services-flask/docker-compose.yml
Line 11 in 2c03631
The text was updated successfully, but these errors were encountered: