Commit 098f6175 authored by Bryan  BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

re-use container created to build the static client to run `yarn dev`

parent fcf2c306
################################################# #################################################
# container to build the client # container shipping client source and dependencies
################################################# #################################################
FROM node:16-buster as client-static-build FROM node:16-buster as client-base-container
ARG API_URL ARG API_URL
...@@ -17,6 +17,14 @@ RUN yarn install ...@@ -17,6 +17,14 @@ RUN yarn install
COPY . /client COPY . /client
#################################################
# container that will generate the client
#################################################
FROM client-base-container as client-static-build
ARG API_URL
RUN yarn run generate RUN yarn run generate
......
...@@ -41,18 +41,16 @@ services: ...@@ -41,18 +41,16 @@ services:
- rabbitmq - rabbitmq
- celery - celery
front: front:
image: node:15.12.0-buster build:
command: > context: client
bash -c "cd client && target: client-base-container
yarn install && command: ['yarn', 'dev']
yarn dev"
environment: environment:
HOST: 0.0.0.0 HOST: 0.0.0.0
NODE_ENV: development NODE_ENV: development
# API_URL: http://172.19.0.1:8000/api # API_URL: http://172.19.0.1:8000/api
volumes: volumes:
- ./client:/client - ./client:/client
- /client/node_modules
ports: ports:
- '3000:3000' - '3000:3000'
front-static: front-static:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment