NBISweden / encam

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

Support for deploying #50

Closed pontus closed 4 years ago

pontus commented 4 years ago

Changes to build production images while supporting developer workflow.

Fixes #32.

danr commented 4 years ago

Copying the discussion from slack for reference

The frontend development workflow is destroyed though. The point with the parcel build server is hot module reloading (or react fast refresh as the new version is called). This uses a websocket connection to send new javascript to the browser when files change and they are run automatically without a page refresh and retains the state of components whenever possible. This trip typically takes less than 0.5s. The development solution you have proposed takes about 60s, requires a manual refresh and retains no state.

I'm fine with some check of process.env.NODE_ENV in the javascript code to get around this, that is no problem.

Some comment about what the crypto-signing is about would be good.

Base branch should be dev, not master, sorry about this confusion.

When trying to change the pong endpoint to return something else in /api/server.py but it's not updated but this message is obtained:

main_1      | /api_source/ MODIFY server.py
main_1      | rsync: failed to set times on "/code/.": Operation not permitted (1)
main_1      | rsync: failed to set times on "/code/.database.py.kak.uujUyx": Operation not permitted (1)
main_1      | rsync: failed to set times on "/code/.server.py.kak.17Nxr1": Operation not permitted (1)
main_1      | rsync: failed to set times on "/code/Dockerfile": Operation not permitted (1)
main_1      | rsync: failed to set times on "/code/SIM.csv": Operation not permitted (1)
main_1      | rsync: failed to set times on "/code/db.pickle": Operation not permitted (1)
main_1      | rsync: failed to set times on "/code/requirements.txt": Operation not permitted (1)
main_1      | rsync: failed to set times on "/code/test.py": Operation not permitted (1)
main_1      | rsync: failed to set times on "/code/__pycache__": Operation not permitted (1)
main_1      | rsync: failed to set times on "/code/__pycache__/database.cpython-36.pyc": Operation not permitted (1)
main_1      | rsync: failed to set times on "/code/__pycache__/database.cpython-38.pyc": Operation not permitted (1)
main_1      | rsync: failed to set times on "/code/__pycache__/server.cpython-36.pyc": Operation not permitted (1)
main_1      | rsync: failed to set times on "/code/__pycache__/server.cpython-38.pyc": Operation not permitted (1)
main_1      | rsync: mkstemp "/code/.server.py.Qr3hwN" failed: Permission denied (13)
(edited)
danr commented 4 years ago

Just small comments above.

I don't grok all conf in supervisord and nginx but seems reasonable.

The CORS stuff in api/server.py can now be removed.

danr commented 4 years ago

Something interestesting happened with the history when the base branch was changed so it's now non-trivial to rebase this on dev. One solution could be to squash all the commits here. Anyone against?

danr commented 4 years ago

Seems to be easier to make a merge commit merging dev into this branch. The history gets a bit wonky but I don't think it'll matter.

pontus commented 4 years ago

Hrrm, not sure I understand the issue with merging to dev, but I don't think there is any loss in losing these commits, so squashing would work? (UI is not intuitive to me, but the arrow besides Merge pull request allows selection of other options.