Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
build
.dockerignore
Dockerfile
Dockerfile.prod

34 changes: 34 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM node:14-alpine as build


LABEL description="This the base Docker image for GDSC UPT Admin Dasboard React app"


ARG BRANCH=main


RUN mkdir /gdsc-admin-dashboard

WORKDIR /gdsc-admin-dashboard

ENV PATH /gdsc-admin-dashboard/node_modules/.bin:$PATH


# install app dependencies

COPY ["package.json", "yarn.lock", "./"]

RUN yarn


# add app

COPY . ./

#RUN yarn run build:$BRANCH --main

EXPOSE 3000

# start app

CMD ["yarn", "start"]
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.1"


services:
dashboard:
build:
context: .
dockerfile: ./Dockerfile
args:
- BRANCH=main
image: "gdsc-admin-dashboard"
ports:
- "3000:3000"
command: yarn start