Merge pull request #3 from diggajupadhyay/main

Run application with Docker
pull/6/head
Cveinnt 2 years ago committed by GitHub
commit 266e835f43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

@ -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

@ -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
Loading…
Cancel
Save