File tree Expand file tree Collapse file tree 5 files changed +49
-49
lines changed Expand file tree Collapse file tree 5 files changed +49
-49
lines changed Original file line number Diff line number Diff line change 1
- # Stage 1: Build
2
- FROM node:19-alpine as build
1
+ FROM node:19-alpine
3
2
4
- # python: required dependency for node alpine, shrinks image size from 2.17GB to 1.67GB
3
+ # python: required dependency for node alpine, shrinks image size from 2.17GB to 1.67GB
5
4
RUN apk add --no-cache --virtual .gyp \
6
5
python3 \
7
6
make \
8
- g++
7
+ g++
9
8
10
9
WORKDIR /app
11
10
12
11
COPY package*.json ./
13
12
14
- RUN npm install --no-install-recommends
15
-
16
- COPY . .
17
-
18
- # Stage 2: Runtime
19
- FROM node:19-alpine as runtime
13
+ COPY app/dist /app
20
14
21
- WORKDIR /app
15
+ COPY .env .env
22
16
23
- COPY --from=build /app/package*.json ./
17
+ COPY server ./server
24
18
25
- RUN npm install --no-install-recommends --only=production
19
+ COPY config.js ./config.js
26
20
27
- COPY --from=build /app/.env .env
28
- COPY --from=build /app/config.js ./config.js
29
- COPY --from=build /app/server ./server
30
- COPY --from=build /app/app/dist /app
21
+ RUN npm install --no-install-recommends
31
22
32
23
EXPOSE 5656
33
24
34
25
ENV IS_DOCKER true
35
26
36
27
CMD [ "npm" , "start" ]
28
+
29
+ # create docker image: "docker build -t reactype-container ." Note: if you want reactype-container with a different name (must be all lowercase)
30
+ # run docker container: "docker run -d -p 5656:5656 reactype-container" docker run -d -p 5656:5656 reactype-v15
31
+ # comment out window.api.formatCode(), but will break it for electron app.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ # Stage 1: Build
2
+ FROM node:19-alpine as build
3
+
4
+ # python: required dependency for node alpine, shrinks image size from 2.17GB to 1.67GB
5
+ RUN apk add --no-cache --virtual .gyp \
6
+ python3 \
7
+ make \
8
+ g++
9
+
10
+ WORKDIR /app
11
+
12
+ COPY package*.json ./
13
+
14
+ RUN npm install --no-install-recommends
15
+
16
+ COPY . .
17
+
18
+ # Stage 2: Runtime
19
+ FROM node:19-alpine as runtime
20
+
21
+ WORKDIR /app
22
+
23
+ COPY --from=build /app/package*.json ./
24
+
25
+ RUN npm install --no-install-recommends --only=production
26
+
27
+ COPY --from=build /app/.env .env
28
+ COPY --from=build /app/config.js ./config.js
29
+ COPY --from=build /app/server ./server
30
+ COPY --from=build /app/app/dist /app
31
+
32
+ EXPOSE 5656
33
+
34
+ ENV IS_DOCKER true
35
+
36
+ CMD [ "npm", "start" ]
Original file line number Diff line number Diff line change 1
- <!doctype html> < html lang ="en-US "> < head > < meta charset ="UTF-8 "/> < script src ="https://kit.fontawesome.com/7e1cebd082.js " crossorigin ="anonymous "> </ script > < meta property ="csp-nonce " content ="YjQ2ODQzZDEtY2NkMS00YWZjLWE2MTAtMWM5Yzc5OThiMmEz "/> < title > ReacType</ title > < link href ="main.css " rel ="stylesheet "> </ head > < body > < div id ="app "> </ div > < script src ="bundle.js "> </ script > </ body > </ html >
1
+ <!doctype html> < html lang ="en-US "> < head > < meta charset ="UTF-8 "/> < script src ="https://kit.fontawesome.com/7e1cebd082.js " crossorigin ="anonymous "> </ script > < meta property ="csp-nonce " content ="MGQ4YmNkYjEtMGU4ZS00MmU5LWIyYWItZmUyMmVkZTY2YzQx "/> < title > ReacType</ title > < link href ="main.css " rel ="stylesheet "> </ head > < body > < div id ="app "> </ div > < script src ="bundle.js "> </ script > </ body > </ html >
You can’t perform that action at this time.
0 commit comments