diff --git a/Dockerfile b/Dockerfile index 61b2c14..f5fd094 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,15 @@ -FROM node:lts +FROM node:lts-alpine WORKDIR /app -COPY . /app +COPY ./package.json /app/ + +COPY ./yarn.lock /app/ RUN yarn +COPY . /app + +EXPOSE 4002 + CMD ["yarn", "dev"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index a8a2440..2f3358a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.8' services: db: - image: 'postgres' + image: 'postgres:alpine' env_file: - db.env volumes: @@ -23,7 +23,7 @@ services: - alectrion-network ports: - 4002:4002 - command: bash -c "yarn && yarn migration:run && yarn dev" + command: sh -c "yarn && yarn migration:run && yarn dev" networks: alectrion-equipment-network: