File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ WORKDIR /model-catalog
1010ENV PATH=/model-catalog/node_modules/.bin:$PATH
1111COPY model_catalog/package.json ./
1212COPY model_catalog/package-lock.json ./
13- RUN npm ci --silent --legacy-peer-deps
13+ RUN npm ci --legacy-peer-deps
14+
1415COPY model_catalog ./
1516RUN node --max-old-space-size=4096 `which npm` run build
1617
@@ -25,8 +26,22 @@ RUN npm run build
2526
2627# production environment
2728FROM docker-registry.ebrains.eu/model-catalog/nginx:stable-alpine
29+
30+ RUN sed -i 's/^user nginx;/#user nginx;/' /etc/nginx/nginx.conf && \
31+ sed -i 's|/var/run/nginx.pid|/tmp/nginx.pid|' /etc/nginx/nginx.conf
32+
2833COPY deployment/nginx-app.conf /etc/nginx/conf.d/default.conf
2934COPY --from=build /model-catalog/dist /usr/share/nginx/html/model-catalog
3035COPY --from=build /curation-dashboard/dist /usr/share/nginx/html/curation-dashboard
31- EXPOSE 80
36+
37+ # Make nginx dirs writable for non-root user (UID 1001) — must come after COPY to preserve ownership
38+ RUN chown -R 1001:0 /var/cache/nginx /var/log/nginx /etc/nginx/conf.d /usr/share/nginx/html && \
39+ chmod -R g+w /var/cache/nginx /var/log/nginx /etc/nginx/conf.d /usr/share/nginx/html
40+
41+ COPY deployment/docker-entrypoint.sh /docker-entrypoint.sh
42+ RUN chmod +x /docker-entrypoint.sh
43+
44+ EXPOSE 8080
45+ USER 1001
46+ ENTRYPOINT ["/docker-entrypoint.sh"]
3247CMD ["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