diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..11420c7 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +node_modules +.git +.gitignore +.env.example +.env \ No newline at end of file diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..afd42c3 --- /dev/null +++ b/.env.example @@ -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 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2467276 --- /dev/null +++ b/Dockerfile @@ -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"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a9c525a --- /dev/null +++ b/docker-compose.yml @@ -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"]