upgradeTo12
VANNEAU 3 years ago
parent e6541acd07
commit 36d5b9b5be
  1. 12
      Dockerfile
  2. 40
      nginx.conf
  3. 24141
      package-lock.json
  4. 5
      src/environments/environment.prod.ts

@ -9,17 +9,19 @@ RUN npm cache clean --force
COPY package*.json /app
RUN npm install --only=prod
RUN npm install @angular/cli@12.2.12
RUN npm install
COPY . /app
RUN npm run build-prod
RUN npm run build --prod
## STEP 2 DEPLOY ##
FROM nginx:1.21.3 AS ngi
COPY --from=build /app/dist/EPAClient /usr/share/nginx/html
COPY --from=build /app/dist/EPAClient /usr/share/nginx/html/EPAClient
COPY /nginx.conf /etc/nginx/conf.d/default.conf
COPY /nginx.conf /etc/nginx/nginx.conf
EXPOSE 4200 49153
EXPOSE 4200
CMD ["nginx", "-g", "daemon off;"]

@ -1,20 +1,22 @@
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 256;
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;
}
worker_processes auto;
events { worker_connections 1024; }
http {
server {
listen 4200;
server_name digitepa_front;
#ssl_certificate /etc/nginx/ssl/www.epa.apside.com.crt;
#ssl_certificate_key /etc/nginx/ssl/www.epa.apside.com.key;
location / {
root /usr/share/nginx/html/EPAClient;
try_files $uri $uri/ admin/index.html;
}
}
}

24141
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -2,10 +2,11 @@ import { AuthConfig } from 'angular-oauth2-oidc';
const keycloakConfig: AuthConfig = {
// Url of the Identity Provider
issuer: 'http://localhost:8080/auth/realms/Apside',
//issuer: 'http://digitepa_keycloak:8080/auth/realms/Apside',
issuer: 'http://digitepa_proxy/auth/realms/Apside',
// URL of the SPA to redirect the user to after login
redirectUri: 'http://localhost:4200',
redirectUri: 'http://digitepa_proxy/',
// The SPA's id. The SPA is registerd with this id at the auth-server
clientId: 'GestionEPA',

Loading…
Cancel
Save