🧑‍💻(compose) build and run y-provider in dev mode

To have a better developer experience, the y-provider service run in dev
mode, allowing hot reload when a file is modified. To avoid issue with
shared node_modules, they are mounted in a separated volume to not have
then in the local directory.
This commit is contained in:
Manuel Raynaud
2025-06-11 09:37:02 +02:00
parent 9a212400a0
commit 4fbbead405
2 changed files with 17 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ RUN apk update && \
apk upgrade && \
rm -rf /var/cache/apk/*
FROM base AS y-provider-builder
FROM base AS y-provider-deps
WORKDIR /home/frontend/
@@ -19,6 +19,16 @@ RUN yarn install
COPY ./src/frontend/packages/eslint-config-impress ./packages/eslint-config-impress
COPY ./src/frontend/servers/y-provider ./servers/y-provider
FROM y-provider-deps AS y-provider-development
WORKDIR /home/frontend/servers/y-provider
EXPOSE 4444
CMD [ "yarn", "dev"]
FROM y-provider-deps AS y-provider-builder
WORKDIR /home/frontend/servers/y-provider
RUN yarn build