Skip to content

Instantly share code, notes, and snippets.

@ram-primathon
Forked from piyushgarg-dev/Dockerfile
Created April 11, 2024 04:02
Show Gist options
  • Select an option

  • Save ram-primathon/53e5fa24bbe39f49c495932ab982675a to your computer and use it in GitHub Desktop.

Select an option

Save ram-primathon/53e5fa24bbe39f49c495932ab982675a to your computer and use it in GitHub Desktop.
Docker In One Shot
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"
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" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment