NBISweden / encam

Encyclopedia of Cancer Microenvironment
http://encima.one
2 stars 2 forks source link

Deploy script to build the frontend #32

Closed danr closed 4 years ago

danr commented 4 years ago

Deploy script to build the frontend.

Idea: let flask be the server for the compiled static page (in addition to serving the dynamic api endpoints). It would be nice if the flask dockerfile can be reused for development and deployed serving.

danr commented 4 years ago
danr commented 4 years ago

We are looking for a solution that

For this project (which is similar to eg chem space and pathbix):

  1. serve static webpage (during development hot module reload dev server)
  2. calculations in a backend
  3. no database process (everything held in memory by python process)
  4. no user system

For other projects like the herdbook 3-4 won't hold anymore, it uses SQL and authentication, so ideally a solution should be adaptable and reusable for that.

It could be convenient if flask+uwsgi+nginx or whatever tool is used and the built static webpage is in the same docker container. It should be easy to script sending a poke to the running server to start running a new version of the page when there is one.

There are parts from #45 that are relevant, like the commit "Compile the frontend statically for the backend" https://github.com/NBISweden/encam/pull/45/commits/87a0d421e83390d2f46e1ef51b2593f133e9394f and the commit that changes from serving with the flask program to uwsgi forwarded by nginx https://github.com/NBISweden/encam/pull/45/commits/b0659e7742356546bae8103e56132872b90f5e1c but probably this will have to be changed.

danr commented 4 years ago

Pontus has finished the docker setup and we will merge it after code review by Dimitrios. Closing this issue as this will happen.