Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 19 additions & 11 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
SERVER_PORT=
HTTP_PORT=3000
HTTP_HOST=localhost
HTTP_PREFIX=api

POSTGRES_PORT=
POSTGRES_DB=
POSTGRES_USER=
POSTGRES_PASSWORD=
DB_HOST=events_node_db

JWT_ACCESS_SECRET=
JWT_ACCESS_EXPIRATION_TIME=
POSTGRES_PORT=5432
POSTGRES_DB=example
POSTGRES_USER=example
POSTGRES_PASSWORD=example

SMTP_HOST=
SMTP_POTY=
SMTP_USER=
SMTP_PASS=
JWT_ACCESS_SECRET=example
JWT_ACCESS_EXPIRATION_TIME=1d

SMTP_HOST=sandbox.smtp.mailtrap.io
SMTP_PORT=2525
SMTP_USER=example
SMTP_PASS=example
SMTP_FROM='"nest-modules" <modules@nestjs.com>'

EMAIL_SUBJECT='Напоминание'
EMAIL_TEXT='У вас назначена встреча сегодня'
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm i
COPY . .
RUN npm run build
CMD ["sh", "-c", "npm run migration:run && npm start"]
17 changes: 14 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,19 @@ services:
events_node_db:
restart: always
image: postgres:16-alpine
container_name: events_node_db
container_name: $DB_HOST
env_file:
- path: ./.env
- path: ./.env
ports:
- "$POSTGRES_PORT:5432"
- '$POSTGRES_PORT:5432'

events_node:
restart: always
build: .
container_name: events_node
env_file:
- path: ./.env
ports:
- '$HTTP_PORT:3000'
depends_on:
- events_node_db
8 changes: 8 additions & 0 deletions nest-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"plugins": [
{
"name": "@nestjs/swagger",
"options": {
"classValidatorShim": true
}
}
],
"deleteOutDir": true
}
}
Loading