Giter VIP home page Giter VIP logo

civis-services-flask-demo's Issues

[BUG] Apps deployed using this Docker Image in Platform seem to ignore `PATH` parameter

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.