-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
4 changed files
with
77 additions
and
4 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
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,4 @@ | ||
FROM nginx:alpine | ||
EXPOSE 80 | ||
COPY ./packages/docs/dist /usr/share/nginx/html | ||
COPY ./packages/docs/build/nginx.conf /etc/nginx/nginx.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,40 @@ | ||
worker_processes 1; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
include mime.types; | ||
default_type application/octet-stream; | ||
root /usr/share/nginx/html; | ||
|
||
sendfile on; | ||
tcp_nopush on; | ||
|
||
keepalive_timeout 65; | ||
|
||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
charset utf-8; | ||
|
||
location / { | ||
index index.html; | ||
try_files $uri $uri/ /_fallback.html; | ||
add_header Cache-Control 'public, max-age=3600, s-maxage=60'; | ||
} | ||
|
||
location /assets/ { | ||
add_header Cache-Control 'public, immutable, max-age=31536000, stale-if-error=604800'; | ||
} | ||
|
||
location = /service-worker.js { | ||
add_header Cache-Control 'public, max-age=0, s-maxage=60, must-revalidate'; | ||
} | ||
|
||
#error_page 404 /404.html; | ||
#error_page 500 502 503 504 /50x.html; | ||
} | ||
} |
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