PhamDinhPhong commited on
Commit
f853d8a
·
1 Parent(s): f5d3cd5

update nginx

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -1
  2. nginx.conf +17 -1
Dockerfile CHANGED
@@ -11,7 +11,8 @@ COPY . .
11
  RUN npm run build
12
 
13
  # Run Stage with Nginx
14
- FROM nginx:1.23-alpine
 
15
 
16
  # Copy the build files from the build stage to Nginx's html folder
17
  COPY --from=build /app/build /usr/share/nginx/html
 
11
  RUN npm run build
12
 
13
  # Run Stage with Nginx
14
+ # FROM nginx:1.23-alpine
15
+ FROM nginxinc/nginx-unprivileged:1.25-alpine
16
 
17
  # Copy the build files from the build stage to Nginx's html folder
18
  COPY --from=build /app/build /usr/share/nginx/html
nginx.conf CHANGED
@@ -1,4 +1,19 @@
1
- server {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  listen 80;
3
  server_name localhost;
4
 
@@ -22,3 +37,4 @@ server {
22
  # Chuyển hướng lỗi 404 về index.html
23
  error_page 404 /index.html;
24
  }
 
 
1
+ worker_processes 1;
2
+
3
+ events { worker_connections 1024 };
4
+
5
+ http {
6
+ include mime.types;
7
+ default_type application/octet-stream;
8
+ sendfile on;
9
+
10
+ client_body_temp_path /tmp/client_temp;
11
+ proxy_temp_path /tmp/proxy_temp;
12
+ fastcgi_temp_path /tmp/fastcgi_temp;
13
+ uwsgi_temp_path /tmp/uwsgi_temp;
14
+ scgi_temp_path /tmp/scgi_temp;
15
+
16
+ server {
17
  listen 80;
18
  server_name localhost;
19
 
 
37
  # Chuyển hướng lỗi 404 về index.html
38
  error_page 404 /index.html;
39
  }
40
+ }