chore: fix build command and improve installation steps

This commit is contained in:
Sammy Teillet 2023-04-18 16:17:01 +02:00
parent 24a3a9d828
commit bba8c592ac
No known key found for this signature in database
GPG Key ID: 687E513E74D28696
3 changed files with 15 additions and 5 deletions

View File

@ -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

View File

@ -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"]

View File

@ -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
COPY ../../server .
CMD ["npm", "run", "start"]