Skip to content

Instantly share code, notes, and snippets.

@piyushgarg-dev
Created October 21, 2023 10:00
Show Gist options
  • Save piyushgarg-dev/ea8c5aa52de0496753b88cd938abd728 to your computer and use it in GitHub Desktop.
Save piyushgarg-dev/ea8c5aa52de0496753b88cd938abd728 to your computer and use it in GitHub Desktop.

Revisions

  1. Piyush Garg created this gist Oct 21, 2023.
    15 changes: 15 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    FROM ubuntu

    RUN apt-get update
    RUN apt-get install -y curl
    RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
    RUN apt-get upgrade -y
    RUN apt-get install -y nodejs

    COPY package.json package.json
    COPY package-lock.json package-lock.json
    COPY main.js main.js

    RUN npm install

    ENTRYPOINT [ "node", "main.js" ]
    16 changes: 16 additions & 0 deletions docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    version: "3.8"

    services:
    postgres:
    image: postgres # hub.docker.com
    ports:
    - "5432:5432"
    environment:
    POSTGRES_USER: postgres
    POSTGRES_DB: review
    POSTGRES_PASSWORD: password

    redis:
    image: redis
    ports:
    - "6379:6379"