Prepare for merge with dev. FIxed docker configs

This commit is contained in:
2023-11-25 19:49:52 +03:00
parent 4bac307109
commit f8d805d18e
3 changed files with 10 additions and 12 deletions

View File

@@ -4,5 +4,6 @@ RUN corepack enable && corepack prepare pnpm@latest --activate
COPY package.json pnpm-*.yaml ./ COPY package.json pnpm-*.yaml ./
RUN pnpm install --frozen-lockfile RUN pnpm install --frozen-lockfile
COPY . . COPY . .
RUN pnpm build
EXPOSE 3000 EXPOSE 3000
CMD [ "pnpm", "start" ] CMD [ "pnpm", "start:prod" ]

View File

@@ -11,7 +11,7 @@
"start": "nest start", "start": "nest start",
"start:dev": "nest start --watch", "start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch", "start:debug": "nest start --debug --watch",
"start:prod": "node dist/main", "start:prod": "node dist/src/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "jest", "test": "jest",
"test:watch": "jest --watch", "test:watch": "jest --watch",

View File

@@ -18,28 +18,25 @@ services:
volumes: volumes:
- neuro_postgres_db:/var/lib/postgresql/data - neuro_postgres_db:/var/lib/postgresql/data
restart: always restart: always
backend: backend:
container_name: neuro_backend container_name: neuro_backend
build: ./backend build: ./backend
stdin_open: true
environment: environment:
- DATABASE_HOST='db' - DATABASE_PORT=5432
- DATABASE_PORT=${DATABASE_PORT} - DATABASE_HOST=db
- DATABASE_USERNAME=${DATABASE_USER} env_file:
- DATABASE_PASSWORD=${DATABASE_PASSWORD} - .env
- DATABASE_DB=${DATABASE_NAME}
networks: networks:
- labnet - labnet
volumes:
- ./backend:/app
- /app/node_modules
ports: ports:
- 3000:3000 - 3000:3000
depends_on: depends_on:
- db - db
restart: always
volumes: volumes:
neuro_postgres_db: neuro_postgres_db:
driver: local driver: local
networks: networks:
labnet: {} labnet: