-
Notifications
You must be signed in to change notification settings - Fork 66
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
104 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,4 @@ | ||
.docusaurus | ||
|
||
/build | ||
/node_modules |
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,19 @@ | ||
FROM node:16 AS builder | ||
WORKDIR /app | ||
|
||
# Install dependencies | ||
COPY package.json package-lock.json /app | ||
RUN npm ci --ignore-scripts | ||
|
||
# Build site | ||
COPY . /app | ||
ENV NODE_OPTIONS=--max_old_space_size=3072 | ||
RUN npm run build | ||
|
||
# ==== Final image ==== | ||
FROM nginx | ||
COPY provisioning/nginx/nginx.conf /etc/nginx/nginx.conf | ||
COPY provisioning/nginx/redirects.map /etc/nginx/redirects.map | ||
COPY --from=builder /app/build/ /usr/share/nginx/html | ||
|
||
EXPOSE 80 |
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,80 @@ | ||
|
||
user nginx; | ||
worker_processes 1; | ||
|
||
error_log /var/log/nginx/error.log warn; | ||
pid /var/run/nginx.pid; | ||
|
||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
access_log /var/log/nginx/access.log main; | ||
|
||
sendfile on; | ||
#tcp_nopush on; | ||
|
||
keepalive_timeout 65; | ||
|
||
gzip on; | ||
gzip_min_length 1000; | ||
gzip_proxied no-cache no-store private expired auth; | ||
gzip_types | ||
application/atom+xml | ||
application/javascript | ||
application/json | ||
application/rss+xml | ||
application/vnd.ms-fontobject | ||
application/x-font-ttf | ||
application/x-font-opentype | ||
application/x-font-truetype | ||
application/x-javascript | ||
application/x-web-app-manifest+json | ||
application/xhtml+xml | ||
application/xml | ||
font/eot | ||
font/opentype | ||
font/otf | ||
image/svg+xml | ||
image/x-icon | ||
image/vnd.microsoft.icon | ||
text/css | ||
text/plain | ||
text/javascript | ||
text/x-component; | ||
|
||
map_hash_bucket_size 256; # see http://nginx.org/en/docs/hash.html | ||
|
||
map $request_uri $new_uri { | ||
include /etc/nginx/redirects.map; | ||
} | ||
|
||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
if ($new_uri) { | ||
return 301 $new_uri; | ||
} | ||
|
||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
} | ||
|
||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /usr/share/nginx/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/display/FREESWITCH/Index /docs; |