civisanalytics / civis-services-flask-demo Goto Github PK
View Code? Open in Web Editor NEWExample Flask app hosted in Civis
License: BSD 3-Clause "New" or "Revised" License
Example Flask app hosted in Civis
License: BSD 3-Clause "New" or "Revised" License
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.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.