fix: docker production

This commit is contained in:
Louis Auzuret
2022-06-20 15:39:32 +02:00
parent a995798251
commit cc478ec198
2 changed files with 5 additions and 7 deletions

View File

@@ -3,7 +3,5 @@ WORKDIR /app
COPY ./package.json ./
RUN npm install
COPY . .
RUN npx prisma generate
RUN npx prisma migrate dev
RUN npm run build
CMD ["npm", "run", "start:prod"]
CMD npx prisma generate ; npx prisma migrate dev ; npm run start:prod

View File

@@ -1,8 +1,8 @@
services:
back:
build: ./back
build: ./back
ports:
- "8080:3000"
- "3000:3000"
depends_on:
- "db"
env_file:
@@ -13,6 +13,6 @@ services:
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_NAME}
- POSTGRES_DB=${POSTGRES_DB}
ports:
- "5432:5432"
- "5432:5432"