File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,8 +27,17 @@ RUN npm run build
2727
2828# production environment
2929FROM docker-registry.ebrains.eu/model-catalog/nginx:stable-alpine
30+
31+ # Make nginx dirs writable for non-root user (UID 1001)
32+ RUN chown -R 1001:0 /var/cache/nginx /var/log/nginx /etc/nginx/conf.d && \
33+ chmod -R g+w /var/cache/nginx /var/log/nginx /etc/nginx/conf.d && \
34+ sed -i 's/^user nginx;/#user nginx;/' /etc/nginx/nginx.conf && \
35+ sed -i 's|/var/run/nginx.pid|/tmp/nginx.pid|' /etc/nginx/nginx.conf
36+
3037COPY deployment/nginx-app-staging.conf /etc/nginx/conf.d/default.conf
3138COPY --from=build /model-catalog/dist /usr/share/nginx/html/model-catalog
3239COPY --from=build /curation-dashboard/dist /usr/share/nginx/html/curation-dashboard
33- EXPOSE 80
40+
41+ EXPOSE 8080
42+ USER 1001
3443CMD ["nginx", "-g", "daemon off;"]
Original file line number Diff line number Diff line change 22
33
44server {
5- listen 80 ;
5+ listen 8080 ;
66
77 location / {
88 root /usr/share/nginx/html/model-catalog;
You can’t perform that action at this time.
0 commit comments