Spaces:
Build error
Build error
File size: 1,481 Bytes
98eaa7b 60afc57 3e875e8 698e726 0165dac 60afc57 b0bdd97 9b706a5 5eaa401 b0bdd97 0165dac b0bdd97 60afc57 b0bdd97 f6caeb4 d194565 62b7493 b0bdd97 98eaa7b b0bdd97 b1244c2 fc9e695 b0bdd97 9b706a5 b0bdd97 4bd6e4f 98eaa7b 60d0969 32684b6 9b706a5 b1c8cba b0bdd97 815ea35 9aa7ef2 c7b130c 535e1e4 d5f7422 f437c9b c7b130c 9bd5591 b0bdd97 b1c8cba 9359cce b0bdd97 f6caeb4 9359cce cd4823c 4bf6a3e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
FROM node:18
# Set default user and working dir
WORKDIR /opt/node_app
RUN chown -R 1000:1000 /opt/node_app
USER 1000
# Set production build
ENV NODE_ENV=production
ENV PORT=5002
# Git Clone draw and room
RUN git clone https://github.com/excalidraw/excalidraw
#RUN git clone https://github.com/excalidraw/excalidraw-room
# Build excalidraw-room
#WORKDIR /opt/node_app/excalidraw-room
#RUN yarn && yarn build
# BUild excalidraw
WORKDIR /opt/node_app/excalidraw
# Use sed to add in local host on port 5002
#RUN sed -i 's/VITE_APP_WS_SERVER_URL=/VITE_APP_WS_SERVER_URL=http:\/\/localhost:5002/' .env.production
# Install additional options and deps
RUN yarn add react react-dom react-scripts canvas node
#RUN npm install workbox-build workbox-window eslint
#RUN yarn add react react-dom @excalidraw/excalidraw workbox-build workbox-window eslint
# Run yarn to install deps
#RUN yarn --ignore-optional --network-timeout 600000
RUN yarn --network-timeout 600000
# Make port 5001/5002 available outside the container
EXPOSE 5001
EXPOSE 5002
# Start the development server
#CMD ["python3", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "3000"]
#CMD ["python3", "app.py"]
#CMD ["nginx", "-g", "daemon off;"]
#CMD ["python3", "-m", "http.server", "3000"]
COPY start.sh .
# switch back to root to execute start commands
USER root
# Install pm2 for excalidraw-room
#RUN npm install pm2 -g
RUN chmod +x start.sh
CMD ["/bin/bash" "/opt/node_app/excalidraw/start.sh"] |