Skip to content

Instantly share code, notes, and snippets.

@hanshoglund
Created November 1, 2016 13:56
Show Gist options
  • Save hanshoglund/5141e462221de4523d1ba17052c97f80 to your computer and use it in GitHub Desktop.
Save hanshoglund/5141e462221de4523d1ba17052c97f80 to your computer and use it in GitHub Desktop.
For this to work, I patch my local env with this diff: `git diff master...hans-testing-bs` using `git merge —squash hans-testing-bs`
Get new prod env like this (DB, deploy, ghcjs/build env)
Create DB and prod container (running)
./buildbits/bin/buildosaurus beautilytics-browsable-cli
Create ghcjs-env
DO="" ./buildbits/bin/c $(cat .builder/image-id/ghcjs-env)
In ghcjs-env container, I rebuild the platform with (from src/b/beautilytics)
SHAKEOPTS=--fast make dpkg STACKOPTS="--fast -j4"
On production, I restart with (from src/b)
sh beautilytics/scripts/hansh_reload_package.sh
Auto rebuild+deploy (experimental)
Requires entr (from apt)
In deploy container (test output goes here)
while true;do echo beautilytics/install_root/be* | entr sh beautilytics/scripts/hansh_reload_package.sh; done;
In ghcjs-env container (build errors go here)
find . | grep -e .hs | entr sh -c 'clear && echo Rebuilding... && SHAKEOPTS=--fast make dpkg STACKOPTS="--fast -j4"'
To look at platform, I tunnel to show page at localhost:2233, where X is IP of deploy env
ssh -Nv -L2233:X:80 [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment