Skip to content

Instantly share code, notes, and snippets.

@cliftonc
Last active April 11, 2017 16:35
Show Gist options
  • Save cliftonc/9ed17927907d52f4fac480c9f428139b to your computer and use it in GitHub Desktop.
Save cliftonc/9ed17927907d52f4fac480c9f428139b to your computer and use it in GitHub Desktop.

Checklist

  • Ensure you have latest docker images for everything before starting.
  • Ensure you have given docker sufficient ram and cpu (8gb / 6) works for me.
  • Ensure you have the latest bosco.
  • Ensure any services you depend on have all references to databases and other services via local.tescloud.com. If you see localhost then it won't work in a container.
  • Ensure any services have a default worker config of 1 worker (most have 2). This reduces local memory usage further.
  • bosco morning your team.
  • Go into the app you want to work on, I use three console tabs:
    • bosco run -d - starts all dependencies of current service, I typically then switch this tab to a pm2 logs output.
    • bosco cdn - cdn - uses dependency tree to minimise start time.
    • npm run dev - current service in live reload.
  • Don't run the entire team, use the dependency tree.
  • If you're about to work offline, make sure you request all the pages you are working on before going offline. This lets bosco cache the assets it is proxying from the CDN, if not, then it won't work as you wont have the locally cached assets (~/.bosco/cache).
  • If you need to edit multiple services at once, do the same as above, but then:
    • Manually stop the dependent service (e.g. pm2 stop service-qa).
    • Go into that service and run it in dev mode: npm run dev.
    • If the service is normally a docker dependency and you rarely edit it (e.g. not part of your team), I prefer to clone it manually into the team folder for the period I am working on it vs add to your team. A good example of this is service-site-assets Building takes ages, best not to leave it hanging around.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment