Skip to content

Commit

Permalink
Merge pull request Cveinnt#3 from diggajupadhyay/main
Browse files Browse the repository at this point in the history
Run application with Docker
  • Loading branch information
Cveinnt authored May 17, 2022
2 parents 434ac1c + cc1f2f5 commit 266e835
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:18-alpine as base

WORKDIR /home/node/app
COPY package.json ./
RUN npm install -g npm-check-updates
RUN ncu -u
RUN npm install
COPY . ./

FROM base as production

ENV NODE_PATH=./build
RUN npm run build
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@ Then install dependencies and start developing there:
yarn install && yarn dev
```

### Docker Usage
- Clone the project.
- Edit `config.json`.
- Run the following to start the service (from within the project dir):
````shell
docker-compose up -d
````

You can also try changing `Dockerfile` & `docker-compose.yml` ONLY IF YOU KNOW WHAT YOU ARE DOING!
Learn about Docker [here](https://docs.docker.com/get-started/overview/ "here").

## 📄 Configuration

### Basic Configuration
Expand Down
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: "3.7"
services:
liveterm:
build:
context: .
dockerfile: Dockerfile
target: base
expose:
- '3000'
ports:
- '3000:3000'
volumes:
- ./src/:/home/node/app/src
command: npm run dev

0 comments on commit 266e835

Please sign in to comment.