Discuss the deployment options on dev, eg servers
Currently our deployment of backend looks like this:
./bin/install
./bin/scripts/server
Under the hood it calls v2-build
, cabal install
, v2-test
, haddock
and finally v2-run
.
- https://gitlab.iscpif.fr/gargantext/haskell-gargantext/blob/d362b468db3373972c5ef0ba24413c577355bdbd/bin/install
- https://gitlab.iscpif.fr/gargantext/haskell-gargantext/blob/d362b468db3373972c5ef0ba24413c577355bdbd/bin/scripts/server
Couple of issues:
- Do we need haddock at all? I don't know if it's served anywhere. We can check if haddock compiles on the CI, not use the servers to do that?
- Do we need
cabal install
? It seems to break template haskell with git (haskell-gargantext!422 (comment 14571)) and I don't see any point of recompiling again and installing just to run viacabal v2-run
later. - Could we just ship the CI binaries to servers, without recompiling? I imagine something like this:
git pull
to get nix deps correctly. Then justnix-shell
and run the CI compiled binary that is associated with current git rev (of course this should be scripted). I don't propose docker not to introduce new tech. - In fact I'm not even sure how many recompilations are there: we
v2-build
with-O2
options, but then run (possibly) without them...