Update: Test Docker Environments

This commit is contained in:
Yûki VACHOT 2022-01-13 22:05:49 +01:00
parent e3d563d58b
commit 12f71e5a7f
5 changed files with 26 additions and 12 deletions

8
frontend/Dockerfile Normal file
View file

@ -0,0 +1,8 @@
FROM node:current-alpine
WORKDIR /data/frontend
COPY ["package.json", "package-lock.json*", "./"]
COPY . .
RUN apk add --no-cache gettext
#RUN envsubst < environments/environment.ts > environments/environment.ts
RUN npm install --NODE_ENV
RUN npm install -g @angular/cli

View file

@ -2,6 +2,7 @@ import {Component} from '@angular/core';
import {Router} from "@angular/router";
import {MessageService} from "../../common/services/message/message.service";
import {HashageService} from "../../common/services/hashage/hashage.service";
import {environment} from "../../../environments/environment";
@ -26,6 +27,7 @@ export class PageLoginComponent
// Appuie sur le bouton "seConnecter"
onSeConnecter(): void
{
console.log("test env: "+environment.api_url);
this.checkField();
if(!this.hasError)
{

View file

@ -1,3 +1,4 @@
export const environment = {
production: true
production: true,
api_url: '${API_URL}'
};

View file

@ -1,9 +1,9 @@
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
export const environment = {
production: false
production: false,
api_url: '${API_URL}'
};
/*