File tree Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 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/
Original file line number Diff line number Diff line change 1+ 0.0.0.0:80 {
2+ gzip
3+ root /usr/share/nginx/html
4+
5+ rewrite {
6+ r .*
7+ to {path} /
8+ }
9+ }
Original file line number Diff line number Diff line change 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+ }
You canβt perform that action at this time.
0 commit comments