Skip to content

Commit

Permalink
Switched to locally hosted TBVerifier container
Browse files Browse the repository at this point in the history
  • Loading branch information
a-baur committed Mar 18, 2024
1 parent 7bba8a3 commit 9a0d624
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 24 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
.angular
.idea
.vscode
dist

.git
.editorconfig
/.vscode/*
/node_modules
/proxy/node_modules
/e2e
/docs
.gitignore
Expand Down
46 changes: 28 additions & 18 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,34 @@ version: "1"
name: "transient-behavior-requirement-optimizer"

services:
dashboard:
image: ghcr.io/cambio-project/transient-behavior-requirement-refiner:latest
ports:
- 8080:80

proxy:
build:
context: ./proxy
dockerfile: Dockerfile
network: host
ports:
- 3000:3000
networks:
- dashboardNetwork
depends_on:
- dashboard
extra_hosts:
- host.docker.internal:host-gateway
tbverifier:
image: ghcr.io/cambio-project/transient-behavior-verifier:latest
ports:
- 8083:5000
networks:
- dashboardNetwork

tqproprefiner:
image: ghcr.io/cambio-project/transient-behavior-requirement-refiner:latest
ports:
- 8080:80
networks:
- dashboardNetwork

proxy:
build:
context: ./proxy
dockerfile: Dockerfile
network: host
ports:
- 8070:8070
networks:
- dashboardNetwork
depends_on:
- tqproprefiner
extra_hosts:
- host.docker.internal:host-gateway

networks:
dashboardNetwork:
dashboardNetwork:
2 changes: 1 addition & 1 deletion proxy/prometheus.proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const axios = require('axios');
const cors = require('cors');
const stream = require("stream");
const app = express();
const port = 3000;
const port = 8070;

// handle arguments
const showHelp = () => {
Expand Down
16 changes: 11 additions & 5 deletions src/app/core/services/validation.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { Absence } from 'src/app/shared/psp/sel/patterns/occurence/absence';
import { Universality } from 'src/app/shared/psp/sel/patterns/occurence/universality';
import { TimeBound } from 'src/app/shared/psp/constraints/time-bound';

// const VERIFIER_URL = "http://localhost:5000";
const VERIFIER_URL = "https://transient-behavior-verifier-abngcvp24a-uc.a.run.app";
// const VERIFIER_URL = "http://localhost:5000"; // local
const VERIFIER_URL = "http://localhost:8083"; // docker

@Injectable({
providedIn: 'root'
Expand All @@ -35,7 +35,10 @@ export class ValidationService {
predicate.predicateInfo
],
"measurement_source": "csv",
"measurement_points": dataset.measurementPoints
"measurement_points": dataset.measurementPoints,
"options": {
"create_plots": false
}
});
return this.sendRequest("monitor", request, predicate, dataset.file);
}
Expand All @@ -53,7 +56,10 @@ export class ValidationService {
"specification_type": "psp",
"predicates_info": property.predicateInfos,
"measurement_source": "csv",
"measurement_points": dataset.measurementPoints
"measurement_points": dataset.measurementPoints,
"options": {
"create_plots": false
}
});
return this.sendRequest("monitor", request, property, dataset.file).then(validationResponse => {
return validationResponse;
Expand All @@ -72,7 +78,7 @@ export class ValidationService {
"specification_type": "psp",
"predicates_info": property.predicateInfos,
"measurement_source": "csv",
"measurement_points": dataset.measurementPoints
"measurement_points": dataset.measurementPoints,
});

return this.sendRequest("refine_timebound", request, property, dataset.file)
Expand Down

0 comments on commit 9a0d624

Please sign in to comment.