Skip to content

Commit

Permalink
Merge pull request #75 from Chaitanya1672/feat/docker-integration
Browse files Browse the repository at this point in the history
Added Dockerfile and Docker Compose files for project initialization.
  • Loading branch information
DhanushNehru authored Jun 23, 2024
2 parents 0a668de + 6fc3456 commit 5634b9f
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.git
.gitignore
.env.example
.env
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
REACT_APP_RAPID_API_HOST=
REACT_APP_RAPID_API_KEY=
REACT_APP_RAPID_API_URL=
JUDGE0_SUBMISSION_URL=

# Docker Compose Project Name (Optional) eg.custom_code_editor
COMPOSE_PROJECT_NAME=my_project_name
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:20-alpine

WORKDIR /app

COPY package.json package-lock.json ./

RUN npm install

COPY . .

EXPOSE 3000

CMD ["npm", "run", "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.8'

services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
volumes:
- .:/app
env_file:
- .env
command: ["npm", "run", "start"]

0 comments on commit 5634b9f

Please sign in to comment.