File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ FROM node:alpine
2+
3+ LABEL version="1.0"
4+ LABEL description="Code Editor."
5+ LABEL maintainer=["mohitur669@gmail.com" ]
6+
7+ WORKDIR /app
8+
9+ COPY ["package.json" , "package-lock.json" , "./" ]
10+
11+ RUN npm install --production
12+
13+ COPY . .
14+
15+ # Set environment variables
16+ ENV REACT_APP_BACKEND_URL=<your_backend_url>
17+ ENV SERVER_PORT=<your_server_port>
18+
19+ # Expose the necessary ports
20+ EXPOSE 5000
21+ EXPOSE 8000
22+ EXPOSE 3000
23+
24+ # Run the application
25+ CMD ["npm" , "run" , "start:docker" ]
Original file line number Diff line number Diff line change 1+ version : " 3"
2+
3+ services :
4+ code-editor :
5+ build :
6+ context : .
7+ dockerfile : ./Dockerfile
8+ image : " <your_docker_username>/code-editor"
9+ ports :
10+ - " 5000:5000"
11+ - " 3000:3000"
12+ - " 8000:8000"
Original file line number Diff line number Diff line change 2222 "web-vitals" : " ^2.1.4"
2323 },
2424 "scripts" : {
25+ "start:docker" : " pm2 start server.js && npm start" ,
2526 "start" : " react-scripts start" ,
2627 "build" : " react-scripts build" ,
2728 "build:digitalocean" : " npm install --force && react-scripts build" ,
You can’t perform that action at this time.
0 commit comments