pet-library icon indicating copy to clipboard operation
pet-library copied to clipboard

Dockerize the project

Open nullism opened this issue 3 years ago β€’ 0 comments

This makes it a bit easier to use for those on special node versions.

A Dockerfile like:

FROM node

COPY . /app
WORKDIR /app
RUN npm install
EXPOSE 4000

ENTRYPOINT npm start

Coupled with a docker-compose.yaml like:

version: "3.9"

services:
  api:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "4000:4000"
    volumes:
      - ./:/app

Then just docker compose up api

nullism avatar Oct 03 '22 19:10 nullism