docker fixes
parent
d1e5a0cda8
commit
84c5066abd
|
@ -37,3 +37,7 @@ COPY ./server/src ./src
|
||||||
RUN CI=true sh -c "cd /app && mkdir data && npm run start && rm -rf data"
|
RUN CI=true sh -c "cd /app && mkdir data && npm run start && rm -rf data"
|
||||||
|
|
||||||
COPY --from=build /app/build /app/public
|
COPY --from=build /app/build /app/public
|
||||||
|
|
||||||
|
LABEL org.opencontainers.image.source="https://github.com/cogentapps/chat-with-gpt"
|
||||||
|
|
||||||
|
CMD ["npm", "run", "start"]
|
|
@ -4,7 +4,7 @@
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "npx ts-node src/index.ts"
|
"start": "npx ts-node --logError src/index.ts"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
@ -95,6 +95,10 @@ export default class ChatServer {
|
||||||
}
|
}
|
||||||
|
|
||||||
async initialize() {
|
async initialize() {
|
||||||
|
if (!fs.existsSync('./data')) {
|
||||||
|
fs.mkdirSync('./data');
|
||||||
|
}
|
||||||
|
|
||||||
await this.objectStore.initialize();;
|
await this.objectStore.initialize();;
|
||||||
await this.database.initialize();;
|
await this.database.initialize();;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue