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 WORKDIR /srv/app
COPY ./ /srv/app COPY ./ /srv/app
RUN npm install RUN npm install
RUN npm run typeorm:run-migrations
EXPOSE $PORT EXPOSE $PORT
@@ -25,6 +25,7 @@ export class CreateTorrentsTableAndRelateToFiles1673603746273
info_hash VARCHAR(64), info_hash VARCHAR(64),
progress REAL, progress REAL,
transmission_id INTEGER, transmission_id INTEGER,
linkomanija TINYINT,
info TEXT info TEXT
);`, );`,
); );
+4
View File
@@ -6,12 +6,16 @@ if [ "$NODE_ENV" == "production" ]; then
npm run prebuild npm run prebuild
echo "Running build" echo "Running build"
npm run build npm run build
echo "Running migrations"
npm run typeorm:run-migrations
echo "Starting app" echo "Starting app"
npm run start:prod npm run start:prod
else else
echo "Starting app in development mode" echo "Starting app in development mode"
echo "Running prebuild" echo "Running prebuild"
npm run prebuild npm run prebuild
echo "Running migrations"
npm run typeorm:run-migrations
echo "Starting app" echo "Starting app"
npm run start:dev npm run start:dev
fi fi