Skip to content

Commit

Permalink
Docker added
Browse files Browse the repository at this point in the history
  • Loading branch information
BloodBoy21 committed Feb 17, 2022
1 parent 4a1cf2d commit 37e4825
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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" ]
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -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" ]

0 comments on commit 37e4825

Please sign in to comment.