Begin on devops

This commit is contained in:
Errormacr
2023-11-25 18:29:29 +03:00
parent 2c0ff4b058
commit 504ca91b94
3 changed files with 26 additions and 0 deletions

2
backend/.dockerignore Normal file
View File

@@ -0,0 +1,2 @@
node_modules
dockerfile

8
backend/dockerfile Normal file
View File

@@ -0,0 +1,8 @@
FROM node:lts-alpine
WORKDIR /app
RUN corepack enable && corepack prepare pnpm@latest --activate
COPY package.json pnpm-*.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
EXPOSE 3000
CMD [ "pnpm", "start" ]

View File

@@ -16,6 +16,22 @@ services:
volumes:
- neuro_postgres_db:/var/lib/postgresql/data
restart: always
backend:
container_name: neuro_front
build: ./backend
stdin_open: true
networks:
- labnet
volumes:
- ./backend:/app
- /app/node_modules
ports:
- 3000:3000
depends_on:
- db
volumes:
neuro_postgres_db:
driver: local
networks:
labnet: