diff --git a/infra/dev/Makefile b/infra/dev/Makefile index 5568250e02..8dc8bd6a5b 100644 --- a/infra/dev/Makefile +++ b/infra/dev/Makefile @@ -1,5 +1,8 @@ build: ## - @docker-compose up --build --force-recreate + @docker-compose down + docker volume rm dev_twenty_node_modules_front || true + docker volume rm dev_twenty_node_modules_server || true + docker-compose build up: ## @docker-compose up -d diff --git a/infra/dev/front/Dockerfile b/infra/dev/front/Dockerfile index 971cf99940..b7d807523b 100644 --- a/infra/dev/front/Dockerfile +++ b/infra/dev/front/Dockerfile @@ -5,9 +5,12 @@ RUN apk update && apk upgrade && \ apk add libc6-compat WORKDIR /app/front -COPY ../../front . -RUN export $(xargs <.env) +COPY ../../front/package.json . +COPY ../../front/package-lock.json . +COPY ../../front/.npmrc . RUN npm install +COPY ../../front . + CMD ["npm", "run", "start"] diff --git a/infra/dev/server/Dockerfile b/infra/dev/server/Dockerfile index 20e36ccec4..774fc33520 100644 --- a/infra/dev/server/Dockerfile +++ b/infra/dev/server/Dockerfile @@ -5,8 +5,12 @@ RUN apk update && apk upgrade && \ apk add libc6-compat WORKDIR /app/server -COPY ../../server . +COPY ../../server/package.json . +COPY ../../server/package-lock.json . RUN npm install -CMD ["npm", "run", "start"] +COPY ../../server . + + +CMD ["npm", "run", "start"] \ No newline at end of file