cogentapps / chat-with-gpt

An open-source ChatGPT app with a voice
https://www.chatwithgpt.ai
MIT License
2.3k stars 493 forks source link

Dockerize the app #109

Closed mariomare22 closed 1 year ago

mariomare22 commented 1 year ago

create a Dockerfile

FROM node:19.9.0

# Create app directory
WORKDIR /usr/src/app

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./

RUN npm install

# Bundle app source
COPY . .

EXPOSE 3000
CMD [ "npm", "start" ]

run docker build . -t <your username>/chat-with-gpt

docker run --name openaccessgpt -d -p 3005:3000 <your username>/chat-with-gpt

PS: Build takes ~2 minutes on performing machines, don't give it up, give it time :-)

djmaze commented 1 year ago

@mariomare22 So "dockerizing" in your case means removing the Dockerfile & server part, renaming the app and adding your own credits?