Bodyless head

Warning: This is work-in-progress and alpha quality at most!

It is possible to run webpack, which prepares all frontend-code, directly on the developer machine and everything else in the cloud (in the proof-of-concept that is a docker container on the local machine).

Here are the steps required (assuming Linux, other platforms may need some tweaking on the commands):

Make sure you have traefik version 2 or later installed. https://traefik.io/#easy-to-install

Start the "rest" of the system in a docker container with vagrant as normal: vagrant up --provision --provider=docker.

Stop the webpack process in the container:

  vagrant ssh
  sudo supervisorctl stop demo-english:demo-english-browser-webpack-00
  exit

Start traefik on the host with the following command (make sure you are in the project root):

  sudo traefik \
      --api.insecure=true \
      --providers.docker \
      --providers.file.directory=$PWD/frontastic/paas/automation/traefik \
      --providers.file.watch=true \
      --log.level="DEBUG" \
      --accessLog=true

Start webpack directly on the host machine (reinstalling npm packages before):

  cd demo_english
  rm -rf node_modules
  cd ..
  yarn install
  cd demo_english
  PORT=8888 yarn run start

You can now access ~http://english-demo.frontastic.io.local/~ with webpack serving bundled frontend code directly from your machine.