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 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; events { worker_connections 1024; }
default_type application/octet-stream;
http {
gzip on;
gzip_http_version 1.1; server {
gzip_disable "MSIE [1-6]\."; listen 4200;
gzip_min_length 256; server_name digitepa_front;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth; #ssl_certificate /etc/nginx/ssl/www.epa.apside.com.crt;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; #ssl_certificate_key /etc/nginx/ssl/www.epa.apside.com.key;
gzip_comp_level 9;
root /usr/share/nginx/html; location / {
root /usr/share/nginx/html/EPAClient;
location / { try_files $uri $uri/ admin/index.html;
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