diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bae9341 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM node:17-alpine3.15 + +RUN mkdir -p /app + +# Create app directory +WORKDIR /app + +COPY package*.json ./ + +RUN npm install +# Bundle app source +COPY . . + + +EXPOSE $PORT +# Set host to localhost / the docker image +ENV PORT=$PORT + + +# Start the app +CMD [ "npm", "start" ] diff --git a/README.md b/README.md new file mode 100644 index 0000000..3382738 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ + +# Nerd chatbot +Simple chatbot made with express and svelte :) + + + +## Installation +Local installation + +```bash + cd ./nerdChatBot + npm install + npm run +``` +```bash + cd ./nerdChatBot/frontend + npm install + npm run +``` +You can find a docker image for frontend and backend to be used in docker-compose \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..b4de2d6 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: '3' +services: + nerdbot-frontend: + image: nerdbot-frontend:latest + environment: + PORT: 5100 + ports: + - 5100:5100 + nerdbot-backend: + image: nerdbot-backend:latest + ports: + - 3000:3000 \ No newline at end of file diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 0000000..cdd0a25 --- /dev/null +++ b/frontend/Dockerfile @@ -0,0 +1,23 @@ +FROM node:17-alpine3.15 + +RUN mkdir -p /app + +# Create app directory +WORKDIR /app + +COPY package*.json ./ + +RUN npm install +# Bundle app source +COPY . . + +RUN npm run build + +EXPOSE $PORT +# Set host to localhost / the docker image +ENV PORT=$PORT +ENV HOST=0.0.0.0 + + +# Start the app +CMD [ "npm", "start" ]