Skip to content

Commit

Permalink
Merge branch 'BE/release' into BE/stroy/journey-del
Browse files Browse the repository at this point in the history
  • Loading branch information
twoo1999 authored Nov 23, 2023
2 parents 6cbe7ac + e243d7b commit c5625dc
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
4 changes: 4 additions & 0 deletions BE/musicspot/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.git
Dockerfile
node_modules
dist
8 changes: 8 additions & 0 deletions BE/musicspot/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:18
RUN mkdir -p /var/app
WORKDIR /var/app
COPY . .
RUN npm install
RUN npm run build
EXPOSE 3000
CMD ["node", "dist/main.js"]
4 changes: 3 additions & 1 deletion BE/musicspot/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import { JourneyModule } from './journey/journey.module';
import { UserModule } from './user/user.module';
@Module({
imports: [
MongooseModule.forRoot('mongodb://localhost:27017/musicspotDB'),
MongooseModule.forRoot(
`mongodb://${process.env.DB_HOST}:${process.env.DB_PORT}/${process.env.DB_NAME}`,
),
JourneyModule,
UserModule,
],
Expand Down
4 changes: 3 additions & 1 deletion BE/musicspot/src/journey/journey.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ describe('JourneysService', () => {
let userModel;
let journeyModel;
beforeEach(async () => {
mongoose.connect('mongodb://localhost:27017/musicspotDB');
mongoose.connect(
`mongodb://${process.env.DB_HOST}:${process.env.DB_PORT}/${process.env.DB_NAME}`,
);
userModel = mongoose.model(User.name, UserSchema);
journeyModel = mongoose.model(Journey.name, JourneySchema);

Expand Down
4 changes: 3 additions & 1 deletion BE/musicspot/src/user/user.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ describe('UserService', () => {
let service: UserService;
let userModel;
beforeEach(async () => {
mongoose.connect('mongodb://localhost:27017/musicspotDB');
mongoose.connect(
`mongodb://${process.env.DB_HOST}:${process.env.DB_PORT}/${process.env.DB_NAME}`,
);
userModel = mongoose.model(User.name, UserSchema);
const module: TestingModule = await Test.createTestingModule({
providers: [
Expand Down

0 comments on commit c5625dc

Please sign in to comment.