docker fixes

main
Cogent Apps 2023-03-15 19:47:47 +00:00
parent d1e5a0cda8
commit 84c5066abd
3 changed files with 9 additions and 1 deletions

View File

@ -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"]

View File

@ -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",

View File

@ -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();;