Mediocreatmybest commited on
Commit
60afc57
·
1 Parent(s): ab35473

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -5
Dockerfile CHANGED
@@ -1,18 +1,24 @@
1
  FROM node:18
 
2
  # Set default user and working dir
3
- #RUN useradd -m -u 1000 user
4
  WORKDIR /opt/node_app
5
  RUN chown -R 1000:1000 /opt/node_app
6
  USER 1000
7
 
 
 
8
 
 
9
  RUN git clone https://github.com/excalidraw/excalidraw
10
  RUN git clone https://github.com/excalidraw/excalidraw-room
 
11
  # Change to the newly created directory
12
  WORKDIR /opt/node_app/excalidraw-room
13
  RUN yarn && yarn build
14
 
15
  WORKDIR /opt/node_app/excalidraw
 
 
16
 
17
  # Set ENV on dev / prod
18
  #RUN echo -e "\n\nBROWSER=NONE" >> .env.development
@@ -26,10 +32,6 @@ WORKDIR /opt/node_app/excalidraw
26
  # Run yarn to install deps
27
  RUN yarn --ignore-optional --network-timeout 600000
28
 
29
- # Set prod build
30
-
31
- ARG NODE_ENV=production
32
-
33
  # Build prod
34
 
35
  #RUN yarn build:app:docker && \
 
1
  FROM node:18
2
+
3
  # Set default user and working dir
 
4
  WORKDIR /opt/node_app
5
  RUN chown -R 1000:1000 /opt/node_app
6
  USER 1000
7
 
8
+ # Set production build
9
+ ARG NODE_ENV=production
10
 
11
+ # Git Clone
12
  RUN git clone https://github.com/excalidraw/excalidraw
13
  RUN git clone https://github.com/excalidraw/excalidraw-room
14
+
15
  # Change to the newly created directory
16
  WORKDIR /opt/node_app/excalidraw-room
17
  RUN yarn && yarn build
18
 
19
  WORKDIR /opt/node_app/excalidraw
20
+ # Set app server to localhost
21
+ RUN sed -i 's/VITE_APP_WS_SERVER_URL=/VITE_APP_WS_SERVER_URL=http:\/\/localhost/' .env.production
22
 
23
  # Set ENV on dev / prod
24
  #RUN echo -e "\n\nBROWSER=NONE" >> .env.development
 
32
  # Run yarn to install deps
33
  RUN yarn --ignore-optional --network-timeout 600000
34
 
 
 
 
 
35
  # Build prod
36
 
37
  #RUN yarn build:app:docker && \