Merge remote-tracking branch 'origin/dmp-refactoring' into accessibility-refactor

This commit is contained in:
mchouliara 2024-10-01 16:55:33 +03:00
commit 28f883a9d0
3 changed files with 47 additions and 3 deletions

View File

@ -14,6 +14,21 @@ COPY . .
RUN npm run build RUN npm run build
#RUN node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build -- --deploy-url=/ --prod #RUN node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build -- --deploy-url=/ --prod
EXPOSE 3000 FROM nginx:mainline-alpine
## Run the production server.
CMD ["npm", "run", "serve", "--", "--host", "0.0.0.0", "--no-open"] #!/bin/sh
COPY nginx.conf.CI /etc/nginx/conf.d/default.conf
COPY start_nginx.sh /start_nginx.sh
RUN mkdir -p /tmp/log/nginx
## Remove default nginx index page
RUN rm -rf /usr/share/nginx/html/*
# Copy from the stage 1
COPY --from=builder /src/build /usr/share/nginx/html
RUN cp /usr/share/nginx/html/index.html /usr/share/nginx/html/index_base.html
EXPOSE 80
ENTRYPOINT ["sh", "/start_nginx.sh"]

27
docs/nginx.conf.CI Normal file
View File

@ -0,0 +1,27 @@
server {
listen 80;
sendfile on;
default_type application/octet-stream;
gzip on;
gzip_http_version 1.1;
gzip_disable "MSIE [1-6]\.";
gzip_min_length 1100;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_comp_level 9;
root /usr/share/nginx/html;
location / {
try_files $uri $uri/ /index.html =404;
}
}

2
docs/start_nginx.sh Normal file
View File

@ -0,0 +1,2 @@
#!/bin/bash
nginx -g "daemon off;"