From a2f174f6ed291d5b5017ccfa4307e6868c86ebef Mon Sep 17 00:00:00 2001 From: martinjrobins Date: Wed, 1 Mar 2023 13:46:27 +0000 Subject: [PATCH 1/2] #47 frontend-dev runs yarn install on docker-compose up --- docker-compose.dev.yml | 7 ++++++- docker-compose.yml | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index cf3bc90d..b1b81105 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -22,7 +22,12 @@ services: context: ./frontend ports: - "3000:3000" - command: yarn start + command: > + bash -c " + yarn install && + yarn start + " + restart: unless-stopped # old_worker: diff --git a/docker-compose.yml b/docker-compose.yml index 80525fbc..5cfde037 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,7 +29,6 @@ services: - "80:80" volumes: - ./frontend:/app - - /app/node_modules/ working_dir: /app env_file: - ./.env From 1aed39755c52592f283654c673934b66e228b168 Mon Sep 17 00:00:00 2001 From: martinjrobins Date: Wed, 1 Mar 2023 19:19:51 +0000 Subject: [PATCH 2/2] #47 move volume map to frontend dev --- docker-compose.dev.yml | 3 +++ docker-compose.yml | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index b1b81105..afc9bca5 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -22,6 +22,9 @@ services: context: ./frontend ports: - "3000:3000" + volumes: + - ./frontend:/app + working_dir: /app command: > bash -c " yarn install && diff --git a/docker-compose.yml b/docker-compose.yml index 5cfde037..cb888ef7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,9 +27,6 @@ services: - app ports: - "80:80" - volumes: - - ./frontend:/app - working_dir: /app env_file: - ./.env restart: unless-stopped