diff --git a/Dockerfile b/Dockerfile index 8a2e3ea..1c9a6ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,3 +37,7 @@ COPY ./server/src ./src RUN CI=true sh -c "cd /app && mkdir data && npm run start && rm -rf data" COPY --from=build /app/build /app/public + +LABEL org.opencontainers.image.source="https://github.com/cogentapps/chat-with-gpt" + +CMD ["npm", "run", "start"] \ No newline at end of file diff --git a/server/package.json b/server/package.json index a517be1..d4e38b0 100644 --- a/server/package.json +++ b/server/package.json @@ -4,7 +4,7 @@ "description": "", "main": "index.js", "scripts": { - "start": "npx ts-node src/index.ts" + "start": "npx ts-node --logError src/index.ts" }, "author": "", "license": "MIT", diff --git a/server/src/index.ts b/server/src/index.ts index 1b52787..1244434 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -95,6 +95,10 @@ export default class ChatServer { } async initialize() { + if (!fs.existsSync('./data')) { + fs.mkdirSync('./data'); + } + await this.objectStore.initialize();; await this.database.initialize();;