From 442c5e09f185c11cb70c08cf7dcc79d8f48679c4 Mon Sep 17 00:00:00 2001 From: Chris Elsworth <148089345+ce-rpf@users.noreply.github.com> Date: Thu, 9 Nov 2023 15:08:07 +0000 Subject: [PATCH] Local development tweaks (#736) Just a couple of small tweaks to make local development easier: * `disableHostCheck` facilitates using the `rpfdev.com` domain I'm working on (I'll share more details of this once its ready for use!) * adding shared network facilitates a local nginx proxy * changing port avoids a clash with projects-ui --- .env.example | 2 +- CHANGELOG.md | 1 + docker-compose.yml | 7 +++++-- webpack.component.config.js | 1 + 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 9bd715467..c00153334 100644 --- a/.env.example +++ b/.env.example @@ -7,4 +7,4 @@ REACT_APP_PLAUSIBLE_DATA_DOMAIN='' REACT_APP_PLAUSIBLE_SOURCE='' REACT_APP_SENTRY_DSN='' REACT_APP_SENTRY_ENV='local' -PUBLIC_URL='http://localhost:3000' +PUBLIC_URL='http://localhost:3010' diff --git a/CHANGELOG.md b/CHANGELOG.md index 00bfc18c7..85d098a2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Changed +- Move local development port to avoid projects-ui clash (#736) - Update design-system-react dependency to publicly available version ## [0.19.4] - 2023-11-08 diff --git a/docker-compose.yml b/docker-compose.yml index e70d33e94..005b9b61f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,14 +17,17 @@ services: <<: *x-app command: yarn start ports: - - "3000:3000" + - "3010:3000" container_name: react-ui react-ui-wc: <<: *x-app command: yarn start:wc ports: - - "3001:3001" + - "3011:3001" container_name: react-ui-wc secrets: npmrc: file: ~/.npmrc +networks: + default: + name: shared-development diff --git a/webpack.component.config.js b/webpack.component.config.js index e1dc884cb..3216670cd 100644 --- a/webpack.component.config.js +++ b/webpack.component.config.js @@ -68,6 +68,7 @@ module.exports = { contentBase: path.join(__dirname, "public"), index: "web-component.html", host: "0.0.0.0", + disableHostCheck: true, port: 3001, writeToDisk: true, },