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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -390,3 +390,4 @@ Temporary Items
docker-compose.yml
.env
dist
pgdata
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ FROM node:12-alpine

WORKDIR /usr/src/app

COPY package.json .
COPY *.json .

COPY src .

RUN npm install --quiet

COPY . .
RUN npm run build

CMD ["npm", "run", "start"]
CMD ["npm", "run", "start:prod"]
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "3.8"
services:
web:
build: .
command: npm run start
command: npm run start:prod
volumes:
- /usr/src/app
environment:
Expand All @@ -27,3 +27,5 @@ services:
- "5432:5432"
networks:
- default
volumes:
- ./pgdata:/var/lib/postgresql/data/
4 changes: 2 additions & 2 deletions src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ import { AlbumMusicianModule } from './albummusician/albummusician.module';
password: 'postgres',
database: 'vinyls',
entities: [Album, CollectorAlbum, Band, Collector, Comment, Musician, Performer, PerformerPrize, Prize, Track,],
dropSchema: true,
dropSchema: false,
synchronize: true,
keepConnectionAlive: true,
migrations: [__dirname + '/migration/**/*{.ts,.js}'],
migrationsRun: false,
migrationsRun: true,
}),
RecordLabelModule,
PrizeModule,
Expand Down