Skip to content

Commit 3868b30

Browse files
Merge branch 'dev' of olha_dev_fullstack:olha-dev-fullstack/nest-rest-graphql into dev
2 parents 39a1bf8 + 6becd22 commit 3868b30

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

.github/workflows/production.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
jobs:
55
checkout:
66
runs-on: [self-hosted, prod]
7-
environment: dev
7+
environment: production
88
steps:
99
- name: Get code
1010
uses: actions/checkout@v4
@@ -20,7 +20,7 @@ jobs:
2020
create_env:
2121
needs: checkout
2222
runs-on: [self-hosted, prod]
23-
environment: dev
23+
environment: production
2424
steps:
2525
- name: Create .env file
2626
run: |
@@ -50,4 +50,4 @@ jobs:
5050
runs-on: [self-hosted, prod]
5151
steps:
5252
- name: Run deployment
53-
run: NODE_ENV=dev pm2 restart dist/main.js --name=events-api
53+
run: NODE_ENV=production pm2 restart dist/main.js --name=events-api

.github/workflows/run-tests.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ on:
44
pull_request:
55
workflow_dispatch:
66
jobs:
7-
checkout:
7+
test:
88
runs-on: ubuntu-latest
9-
environment: dev
109
steps:
1110
- name: Get code
1211
uses: actions/checkout@v4
@@ -19,9 +18,5 @@ jobs:
1918
- name: Install dependencies
2019
if: steps.cache.outputs.cache-hit != 'true'
2120
run: npm ci
22-
test:
23-
runs-on: ubuntu-latest
24-
needs: checkout
25-
steps:
2621
- name: Run tests
2722
run: npm run test

src/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import { SchoolModule } from './school/school.module';
4747
},
4848
{
4949
provide: 'APP_NAME',
50-
useValue: 'The best Nest events backend',
50+
useValue: 'The Nest events application backend',
5151
},
5252
{
5353
provide: 'MESSAGE',

src/config/orm.config.prod.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import { registerAs } from '@nestjs/config';
22
import { TypeOrmModuleOptions } from '@nestjs/typeorm';
33
import { Event } from './../events/event.entity';
4+
import { Attendee } from 'src/events/attendee/attendee.entity';
5+
import { User } from 'src/user/user.entity';
6+
import { Profile } from 'src/auth/profile.entity';
7+
import { Subject } from 'src/school/subject.entity';
8+
import { Teacher } from 'src/school/teacher.entity';
9+
import { Course } from 'src/school/course.entity';
410

511
export default registerAs(
612
'orm.config.prod',
@@ -11,7 +17,7 @@ export default registerAs(
1117
username: process.env.DB_USER,
1218
password: process.env.DB_PASSWORD,
1319
database: process.env.DB_NAME,
14-
entities: [Event],
20+
entities: [Event, Attendee, User, Profile, Subject, Teacher, Course],
1521
synchronize: false,
1622
dropSchema: false,
1723
}),

src/config/orm.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ export default registerAs(
1919
database: process.env.DB_NAME,
2020
entities: [Event, Attendee, User, Profile, Subject, Teacher, Course],
2121
synchronize: true,
22-
dropSchema: Boolean(parseInt(process.env.DB_DROP_SCHEMA)),
22+
dropSchema: Boolean(parseInt(process.env.DB_DROP_SCHEMA ?? '0')),
2323
}),
2424
);

0 commit comments

Comments
 (0)