From 352f0ae6f1934a5113b2d7c51d3d60e2627a1e6e Mon Sep 17 00:00:00 2001 From: Fabrice Marchal Date: Wed, 17 Aug 2022 22:04:29 +0200 Subject: [PATCH] automate database setup and upgrade --- Dockerfile | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 261a5910e..8521e893b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,4 +49,4 @@ FROM node:16-alpine COPY --from=builder /ghostfolio/dist/apps /ghostfolio/apps WORKDIR /ghostfolio/apps/api EXPOSE 3333 -CMD [ "node", "main" ] +CMD [ "yarn", "start:prod" ] diff --git a/package.json b/package.json index 8b9c89be6..ddcf09f26 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "replace-placeholders-in-build": "node ./replace.build.js", "start": "node dist/apps/api/main", "start:client": "ng serve client --configuration=development-en --hmr -o", - "start:prod": "node apps/api/main", + "start:prod": "yarn database:migrate && yarn database:seed && node main", "start:server": "nx serve api --watch", "start:storybook": "nx run ui:storybook", "test": "nx test",