Skip to content

Commit

Permalink
Merge pull request #19 from captainblue2013/master
Browse files Browse the repository at this point in the history
更新Dockerfile,支持react-router
  • Loading branch information
jiangyuzhen authored Mar 29, 2018
2 parents bb61cf5 + fc65e7e commit e3edf77
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM nginx:latest
COPY ./default.conf /etc/nginx/conf.d/
COPY ./build/ /usr/share/nginx/html

CMD ["nginx","-g","daemon off;"]
28 changes: 28 additions & 0 deletions default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
server {
listen 80;
server_name localhost;

#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;

location / {
root /usr/share/nginx/html;
try_files $uri /index.html;
index index.html index.htm;
}


#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}


# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}

0 comments on commit e3edf77

Please sign in to comment.