upgradeTo12
VANNEAU 3 years ago
parent e6541acd07
commit 36d5b9b5be
  1. 12
      Dockerfile
  2. 34
      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 COPY package*.json /app
RUN npm install --only=prod RUN npm install
RUN npm install @angular/cli@12.2.12
COPY . /app COPY . /app
RUN npm run build-prod RUN npm run build --prod
## STEP 2 DEPLOY ## ## STEP 2 DEPLOY ##
FROM nginx:1.21.3 AS ngi 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/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 { worker_processes auto;
listen 80;
sendfile on;
default_type application/octet-stream;
gzip on; events { worker_connections 1024; }
gzip_http_version 1.1;
gzip_disable "MSIE [1-6]\."; http {
gzip_min_length 256;
gzip_vary on; server {
gzip_proxied expired no-cache no-store private auth; listen 4200;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; server_name digitepa_front;
gzip_comp_level 9;
#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;
}
}
root /usr/share/nginx/html;
location / {
try_files $uri $uri/ /index.html =404;
}
} }

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 = { const keycloakConfig: AuthConfig = {
// Url of the Identity Provider // 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 // 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 // The SPA's id. The SPA is registerd with this id at the auth-server
clientId: 'GestionEPA', clientId: 'GestionEPA',

Loading…
Cancel
Save