-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM node:16-alpine3.14 as builder | ||
|
||
RUN apk add --no-cache yarn git autoconf automake libtool g++ make libpng-dev file nasm | ||
|
||
RUN git clone https://github.com/Seeed-Studio/SenseCraft-Web-Toolkit.git /usr/SenseCraft-Web-Toolkit | ||
|
||
WORKDIR /usr/SenseCraft-Web-Toolkit/ | ||
|
||
RUN yarn install \ | ||
&& yarn run build | ||
|
||
COPY default/nginx-default.conf /usr/SenseCraft-Web-Toolkit/nginx-default.conf | ||
|
||
FROM nginx as runner | ||
COPY --from=builder /usr/SenseCraft-Web-Toolkit/dist /usr/share/nginx/html/ | ||
COPY --from=builder /usr/SenseCraft-Web-Toolkit/nginx-default.conf /etc/nginx/conf.d/default.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
#charset koi8-r; | ||
access_log /var/log/nginx/host.access.log main; | ||
error_log /var/log/nginx/error.log error; | ||
|
||
#gzip | ||
gzip on; | ||
gzip_buffers 32 4K; | ||
gzip_comp_level 6; | ||
gzip_min_length 100; | ||
gzip_http_version 1.0; | ||
gzip_types application/javascript text/css text/xml application/vnd.ms-fontobject font/ttf font/opentype font/x-woff image/svg+xml; | ||
gzip_vary on; | ||
|
||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
} | ||
|
||
#error_page 404 /404.html; | ||
|
||
# redirect server error pages to the static page /50x.html | ||
# | ||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
} |