diff --git a/docs/Dockerfile b/docs/Dockerfile index e69de29bb..596b6365c 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -0,0 +1,19 @@ +# stage1 as builder +FROM node:20-alpine AS builder + +# copy the package.json to install dependencies +COPY package.json ./ + +# Install the dependencies and make the folder +RUN npm install --legacy-peer-deps && mkdir /src && mv ./node_modules ./src + +WORKDIR /src + +COPY . . +# Build the project and copy the files +RUN npm run build +#RUN node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build -- --deploy-url=/ --prod + +EXPOSE 3000 +## Run the production server. +CMD ["npm", "run", "serve", "--", "--host", "0.0.0.0", "--no-open"] diff --git a/docs/nginx.conf b/docs/nginx.conf deleted file mode 100644 index 7b29b4cb8..000000000 --- a/docs/nginx.conf +++ /dev/null @@ -1,35 +0,0 @@ - -events { - worker_connections 4096; ## Default: 1024 -} - -http { - include ./mime.types; - server { - - listen 4200; - - sendfile on; - - 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; - - - - - - location / { - root /usr/share/nginx/html; - try_files $uri $uri/ /index.html =404; - add_header Cache-Control "no-store, no-cache, must-revalidate"; - } - - } - -} diff --git a/docs/start_nginx.sh b/docs/start_nginx.sh deleted file mode 100644 index 615c88c59..000000000 --- a/docs/start_nginx.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -if [[ ! -z "${WEBAPP_BASE_URL}" ]]; then - rm /usr/share/nginx/html/index.html - cp /usr/share/nginx/html/index_base.html /usr/share/nginx/html/index.html - find '/usr/share/nginx/html' -name 'index.html' -exec sed -i -e 's,,,g' {} \; -fi - -nginx -g "daemon off;" \ No newline at end of file