From 976574c6ac91ab8f600554f8d856da033593eea8 Mon Sep 17 00:00:00 2001 From: Noah Spannbauer Date: Mon, 29 Dec 2025 23:07:30 -0600 Subject: [PATCH] updating docker compose --- Dockerfile | 6 ++---- api/entrypoint.sh | 4 ---- api/src/database/data-source.ts | 3 ++- 3 files changed, 4 insertions(+), 9 deletions(-) delete mode 100644 api/entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 42c4839..0b919f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,10 +9,8 @@ WORKDIR api RUN npm ci WORKDIR / -COPY ./api/entrypoint.sh ./app/entrypoint.sh -RUN chmod +x ./app/entrypoint.sh EXPOSE 3000 -# CMD ["./app/entrypoint.sh"] -ENTRYPOINT ["tail", "-f", "/dev/null"] \ No newline at end of file +CMD ["node", "./app/api/dist/main.js"] +# ENTRYPOINT ["tail", "-f", "/dev/null"] \ No newline at end of file diff --git a/api/entrypoint.sh b/api/entrypoint.sh deleted file mode 100644 index 527bbb0..0000000 --- a/api/entrypoint.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -cd ./app -npx typeorm migration:run -d ./api/dist/database/data-source.js -node ./api/dist/main.js \ No newline at end of file diff --git a/api/src/database/data-source.ts b/api/src/database/data-source.ts index ee34a70..9767fe5 100644 --- a/api/src/database/data-source.ts +++ b/api/src/database/data-source.ts @@ -11,7 +11,8 @@ export const dataSourceOptions: DataSourceOptions = { database: configService.get('DB_PATH'), entities: ['../**/*.entity.js'], migrations: ['./migrations/*.js'], - synchronize: configService.get('DB_SYNC') + synchronize: configService.get('DB_SYNC'), + migrationsRun: true } const dataSource = new DataSource(dataSourceOptions);