File tree 2 files changed +10
-6
lines changed 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ RUN yarn run build
25
25
26
26
# ==== SET ENV NGINX =====
27
27
# Bundle static assets with nginx
28
- FROM nginx:1.21 .0-alpine as production
28
+ FROM nginxinc/ nginx-unprivileged :1.23 .0-alpine as production
29
29
ENV NODE_ENV production
30
30
# Copy built assets from `builder` image
31
31
COPY --from=builder /app/build /usr/share/nginx/html
@@ -35,10 +35,15 @@ COPY deployment.sh docker-entrypoint.d/.
35
35
# Add your nginx.conf
36
36
COPY nginx.conf /etc/nginx/conf.d/default.conf
37
37
# Expose port
38
- EXPOSE 82
38
+ EXPOSE 8000
39
39
40
40
# ==== START SERVER =====
41
41
# Start nginx
42
42
CMD ["nginx" , "-g" , "daemon off;" ]
43
- # Fails with permission denied
44
- # USER 2000
43
+
44
+ # needed for chmod
45
+ USER root
46
+ # needed for write access for deployment.sh
47
+ RUN mkdir /tmp/proxy_temp && chmod 0757 /usr/share/nginx/html/
48
+ # reinstate the user
49
+ USER nginx
Original file line number Diff line number Diff line change 1
1
server {
2
- listen 82 ;
3
2
4
3
location / {
5
4
root /usr/share/nginx/html/;
6
5
include /etc/nginx/mime.types;
7
6
try_files $uri $uri / /index.html;
8
7
}
9
- }
8
+ }
You can’t perform that action at this time.
0 commit comments