File tree 4 files changed +104
-0
lines changed
4 files changed +104
-0
lines changed Original file line number Diff line number Diff line change
1
+ .docusaurus
2
+
3
+ /build
4
+ /node_modules
Original file line number Diff line number Diff line change
1
+ FROM node:16 AS builder
2
+ WORKDIR /app
3
+
4
+ # Install dependencies
5
+ COPY package.json package-lock.json /app
6
+ RUN npm ci --ignore-scripts
7
+
8
+ # Build site
9
+ COPY . /app
10
+ ENV NODE_OPTIONS=--max_old_space_size=3072
11
+ RUN npm run build
12
+
13
+ # ==== Final image ====
14
+ FROM nginx
15
+ COPY provisioning/nginx/nginx.conf /etc/nginx/nginx.conf
16
+ COPY provisioning/nginx/redirects.map /etc/nginx/redirects.map
17
+ COPY --from=builder /app/build/ /usr/share/nginx/html
18
+
19
+ EXPOSE 80
Original file line number Diff line number Diff line change
1
+
2
+ user nginx;
3
+ worker_processes 1 ;
4
+
5
+ error_log /var/log/nginx/error.log warn ;
6
+ pid /var/run/nginx.pid;
7
+
8
+
9
+ events {
10
+ worker_connections 1024 ;
11
+ }
12
+
13
+
14
+ http {
15
+ include /etc/nginx/mime.types;
16
+ default_type application/octet-stream;
17
+
18
+ log_format main '$remote_addr - $remote_user [$time_local ] "$request " '
19
+ '$status $body_bytes_sent "$http_referer " '
20
+ '"$http_user_agent " "$http_x_forwarded_for "' ;
21
+
22
+ access_log /var/log/nginx/access.log main ;
23
+
24
+ sendfile on ;
25
+ #tcp_nopush on;
26
+
27
+ keepalive_timeout 65 ;
28
+
29
+ gzip on ;
30
+ gzip_min_length 1000 ;
31
+ gzip_proxied no-cache no-store private expired auth;
32
+ gzip_types
33
+ application/atom+xml
34
+ application/javascript
35
+ application/json
36
+ application/rss+xml
37
+ application/vnd.ms-fontobject
38
+ application/x-font-ttf
39
+ application/x-font-opentype
40
+ application/x-font-truetype
41
+ application/x-javascript
42
+ application/x-web-app-manifest+json
43
+ application/xhtml+xml
44
+ application/xml
45
+ font/eot
46
+ font/opentype
47
+ font/otf
48
+ image/svg+xml
49
+ image/x-icon
50
+ image/vnd.microsoft.icon
51
+ text/css
52
+ text/plain
53
+ text/javascript
54
+ text/x-component;
55
+
56
+ map_hash_bucket_size 256 ; # see http://nginx.org/en/docs/hash.html
57
+
58
+ map $request_uri $new_uri {
59
+ include /etc/nginx/redirects.map;
60
+ }
61
+
62
+ server {
63
+ listen 80 ;
64
+ server_name localhost;
65
+
66
+ if ($new_uri ) {
67
+ return 301 $new_uri ;
68
+ }
69
+
70
+ location / {
71
+ root /usr/share/nginx/html;
72
+ index index.html index.htm;
73
+ }
74
+
75
+ error_page 500 502 503 504 /50x.html;
76
+ location = /50x.html {
77
+ root /usr/share/nginx/html;
78
+ }
79
+ }
80
+ }
Original file line number Diff line number Diff line change
1
+ /display/FREESWITCH/Index /docs;
You can’t perform that action at this time.
0 commit comments