Compare commits

...
Author SHA1 Message Date
marc 80aa16c844 new ports 2022-09-21 16:25:45 +02:00
marc 51eeb3d000 Merge remote-tracking branch 'origin/docker-compose' into front-multistage 2022-09-21 16:20:32 +02:00
marc 08f70a7a61 ci 2022-09-21 11:03:09 +02:00
marc e844eafd41 opt/numeris 2022-09-21 10:40:50 +02:00
marc def2fc0335 nginx.conf 2022-09-21 10:37:25 +02:00
marc ec4a85ecbe nginx 2022-09-21 10:36:47 +02:00
marc 694f0b0d25 multistage 2022-09-21 10:32:33 +02:00
marc 6533ab3b30 entrypoint is front is a must 2022-09-19 10:59:19 +02:00
3 changed files with 34 additions and 16 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ services:
context: ./front
dockerfile: Dockerfile
ports:
- 4200:4200
- 8000:80
links:
- back
depends_on:
+14 -15
View File
@@ -1,18 +1,17 @@
FROM node:11.15.0
RUN mkdir -p /home/numeris
ENV PATH /home/numeris/node_modules/.bin:$PATH
COPY package*.json /home/numeris/
# npm install
WORKDIR /home/numeris
RUN npm install
FROM node:11.15.0 as builder
WORKDIR /opt/numeris
ENV PATH /opt/numeris/node_modules/.bin:$PATH
COPY package*.json /opt/numeris/
RUN npm ci
RUN npm install -g @angular/cli@7.3.9
COPY . /home/numeris
COPY . .
RUN npm rebuild node-sass
RUN npm run build-prod
ENTRYPOINT [ "ng", "s", "--host", "0.0.0.0" ]
WORKDIR /home/numeris
FROM nginx
COPY nginx.conf /etc/nginx/conf.d/default.conf
RUN rm -rf /usr/share/nginx/html/*
COPY --from=builder /opt/numeris/dist /usr/share/nginx/html
EXPOSE 80
ENTRYPOINT ["nginx", "-g", "daemon off;"]
+19
View File
@@ -0,0 +1,19 @@
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;
}
}