File tree Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change
1
+ /node_modules
2
+ /.docusaurus
3
+ /build
Original file line number Diff line number Diff line change
1
+ FROM node:latest as base
2
+ WORKDIR /chargepi/docusaurus/
3
+
4
+ COPY ./package.json ./package.json
5
+ COPY ./package-lock.json ./package-lock.json
6
+
7
+ RUN npm install
8
+ COPY . .
9
+ RUN npm run build
10
+
11
+ FROM nginx:latest as website
12
+
13
+ COPY --from=base /chargepi/docusaurus/build /usr/share/nginx/html
Original file line number Diff line number Diff line change 1
- version : ' 3.1 '
1
+ version : ' 3.7 '
2
2
services :
3
3
chargepi-website :
4
- image : nginx
4
+ build :
5
+ context : .
6
+ target : website
5
7
volumes :
6
8
- ./build/:/usr/share/nginx/html/
7
9
- ./nginx.conf:/etc/nginx/nginx.conf
@@ -19,5 +21,5 @@ services:
19
21
- " traefik.docker.network=server"
20
22
networks :
21
23
default :
22
- external :
24
+ external :
23
25
name : server
You can’t perform that action at this time.
0 commit comments