File size: 1,586 Bytes
98eaa7b
5eaa401
535e1e4
 
 
 
 
24c5e53
235f4a0
38d6080
46a59bb
ea162ce
148e8ba
535e1e4
38d6080
80b136c
535e1e4
98eaa7b
 
535e1e4
 
98eaa7b
 
535e1e4
fc9e695
98eaa7b
 
fc9e695
 
fe85de0
46a59bb
4bd6e4f
 
98eaa7b
60d0969
32684b6
98eaa7b
 
 
 
 
 
 
32684b6
98eaa7b
fe85de0
98eaa7b
535e1e4
6a32a1e
 
4db3cec
9b8d401
4db3cec
83927d6
235f4a0
 
 
83927d6
4db3cec
535e1e4
 
 
 
 
d5f7422
83927d6
 
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
FROM node:18

# Default working dir
WORKDIR /opt/node_app


# Get apt up and running
RUN apt update 
RUN apt install python3-pip python3-uvicorn python3-fastapi -y
#RUN apt install git yarn -y
#RUN npm install --global yarn
RUN apt install nginx -y


#RUN npm install react react-dom @excalidraw/excalidraw vscode-languageclient -g

# Create a React 
#RUN npx create-react-app my-excalidraw-app
RUN git clone https://github.com/excalidraw/excalidraw

# Change to the newly created directory
#WORKDIR /opt/node_app/my-excalidraw-app
WORKDIR /opt/node_app/excalidraw

# Set ENV on dev / prod
#RUN echo -e "\n\nBROWSER=NONE" >> .env.development
#RUN echo -e "\n\nBROWSER=NONE" >> .env.development



# Setup npm / yarn / deps
#RUN npm install react react-dom
#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

RUN yarn --ignore-optional --network-timeout 600000

# Set prod build

ARG NODE_ENV=production

# Build prod

RUN yarn build:app:docker

RUN ls -a

COPY /opt/node_app/excalidraw/build /var/www/html
#COPY /opt/node_app/excalidraw/build /var/www/html
#RUN echo "index.html" > /var/www/html/index.html

WORKDIR /opt/node_app/

# Copy fastapi app
#COPY app.py .
#COPY nginx.conf /etc/nginx/sites-available/default

# Make port 3000 available outside the container
EXPOSE 3000

# 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;"]