From 87d9f69d01a5351a1c90b908d883b3c1623e57c4 Mon Sep 17 00:00:00 2001 From: Grace Date: Thu, 13 Sep 2018 19:38:14 -0400 Subject: [PATCH] Add some development-mode configs for `client` The app watches for file changes with the mechanism described at: * https://github.com/facebook/create-react-app/issues/1049 --- docker-compose.dev.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 52d8629..b48d130 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,5 +1,25 @@ version: '3.3' + +# This file is intended to overwrite certain settings from `docker-compose.yml`. +# These changes make it easier to develop, +# with a tighter feedback loop on changes +# and some additional debugging tools installed. +# To activate development mode as defined by this file, +# add this line to your `.env` file: +# +# COMPOSE_FILE=docker-compose.yml:docker-compose.dev.yml + services: + client: + volumes: + # Be sure you have a local copy of the `tb-mobile-app` repo, + # and reference it with the `TB_MOBILE_CONTEXT` variable in `.env`. + - ${TB_MOBILE_CONTEXT}:/usr/src + environment: + # This allows Webpack's dev server to pick up file changes in Docker. + # see https://github.com/facebook/create-react-app/issues/1049 + CHOKIDAR_USEPOLLING: 'true' + web: # command: bash -c '/wait && flask run --host 0.0.0.0 --port 5000' build: