Skip to content

Commit a4a7e59

Browse files
committed
chore: fix deploy script
1 parent 5a074fe commit a4a7e59

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

β€ŽDockerfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM nginx
2+
3+
RUN rm /etc/nginx/conf.d/default.conf
4+
5+
ADD deploy/nginx.conf /etc/nginx/conf.d/default.conf
6+
COPY dist/ /usr/share/nginx/html/

β€Ždeploy/caddy.conf

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
0.0.0.0:80 {
2+
gzip
3+
root /usr/share/nginx/html
4+
5+
rewrite {
6+
r .*
7+
to {path} /
8+
}
9+
}

β€Ždeploy/nginx.conf

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
server {
2+
listen 80;
3+
server_name _;
4+
# gzip config
5+
gzip on;
6+
gzip_min_length 1k;
7+
gzip_comp_level 6;
8+
gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml;
9+
gzip_vary on;
10+
gzip_disable "MSIE [1-6]\.";
11+
12+
root /usr/share/nginx/html;
13+
include /etc/nginx/mime.types;
14+
15+
location / {
16+
try_files $uri $uri/ /index.html;
17+
}
18+
19+
# location /api {
20+
# proxy_pass https://preview.pro.antdv.com/api;
21+
# proxy_set_header X-Forwarded-Proto $scheme;
22+
# proxy_set_header X-Real-IP $remote_addr;
23+
# }
24+
}

0 commit comments

Comments
Β (0)