change migration

This commit is contained in:
Jurgis Sakalauskas
2023-11-03 11:15:45 +02:00
parent 813e8af47f
commit 3ef6f1514f
3 changed files with 5 additions and 1 deletions
-1
View File
@@ -6,7 +6,6 @@ RUN apt-get install ffmpeg -y
WORKDIR /srv/app
COPY ./ /srv/app
RUN npm install
RUN npm run typeorm:run-migrations
EXPOSE $PORT
@@ -25,6 +25,7 @@ export class CreateTorrentsTableAndRelateToFiles1673603746273
info_hash VARCHAR(64),
progress REAL,
transmission_id INTEGER,
linkomanija TINYINT,
info TEXT
);`,
);
+4
View File
@@ -6,12 +6,16 @@ if [ "$NODE_ENV" == "production" ]; then
npm run prebuild
echo "Running build"
npm run build
echo "Running migrations"
npm run typeorm:run-migrations
echo "Starting app"
npm run start:prod
else
echo "Starting app in development mode"
echo "Running prebuild"
npm run prebuild
echo "Running migrations"
npm run typeorm:run-migrations
echo "Starting app"
npm run start:dev
fi