Compare commits
No commits in common. "d2a3d8a30734cd977b834d402108a647e3dd0158" and "8363a8ba1e9331132d2c4ccd44f33f3e202c4064" have entirely different histories.
d2a3d8a307
...
8363a8ba1e
4 changed files with 9 additions and 10 deletions
|
@ -3,9 +3,10 @@ WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm install --legacy-peer-deps # or yarn install
|
RUN npm install --legacy-peer-deps # or yarn install
|
||||||
COPY . .
|
COPY . .
|
||||||
ARG LOCAL=false
|
ARG IN_CLUSTER=true
|
||||||
RUN if [ "$LOCAL" = "true" ]; then \
|
RUN if [ "$IN_CLUSTER" = "true" ]; then \
|
||||||
cp src/environments/environment.local.ts src/environments/environment.ts; \
|
cp src/environments/environment.cluster.ts src/environments/environment.ts; \
|
||||||
|
cp src/environments/environment.cluster.ts proof/environment.ts; \
|
||||||
fi
|
fi
|
||||||
RUN npm run build --prod
|
RUN npm run build --prod
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { environment } from '../enviroments/environment';
|
import { environment } from '../enviroments/environment.cluster';
|
||||||
|
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class JumpService {
|
export class JumpService {
|
||||||
|
|
||||||
private apiUrl = environment.apiBaseUrl;
|
private apiUrl = environment.apiBaseUrl === ''
|
||||||
|
? 'http://localhost:8080/game/jump'
|
||||||
|
: environment.apiBaseUrl;
|
||||||
|
|
||||||
constructor(private http: HttpClient) {}
|
constructor(private http: HttpClient) {}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: true,
|
production: true,
|
||||||
apiBaseUrl: 'http://silly-game-service.silly-game.svc.cluster.local/game/jump'
|
apiBaseUrl: 'http://silly-game-service.silly-game.svc.cluster.local'
|
||||||
};
|
};
|
|
@ -1,4 +0,0 @@
|
||||||
export const environment = {
|
|
||||||
production: true,
|
|
||||||
apiBaseUrl: 'http://localhost:8080/game/jump'
|
|
||||||
};
|
|
Loading…
Reference in a new issue