Projekt

Obecné

Profil

« Předchozí | Další » 

Revize dc564f3a

Přidáno uživatelem Jakub Hlaváč před téměř 4 roky(ů)

Re #8673 - Rozchození aplikace na serveru

  • new docker image
    + docker compose

Zobrazit rozdíly:

Dockerfile
1
FROM node:15.14.0 AS angularApp
2
WORKDIR /usr/src/app
3
COPY package.json package-lock.json ./
4
RUN npm install
5
COPY . .
6
RUN npm run build
7

  
8

  
9
FROM nginx:1.19.6-alpine
10
COPY nginx.conf /etc/nginx/nginx.conf
11
COPY --from=angularApp /usr/src/app/dist/SensLog /usr/share/nginx/html
12

  
compose.yml
1
version: '2'
2
services:
3
  SensLog:
4
    image: senslog
5
    ports:
6
      - 80:80
src/app/sensor/components/sensor.component.ts
30 30

  
31 31
  ngOnInit(): void {
32 32
    // this.getObservations();
33
    //this.getLongQueriesBySourceData();
33
    // this.getLongQueriesBySourceData();
34 34
    this.showGraph();
35 35
  }
36 36

  
......
63 63
  }
64 64

  
65 65
  showGraph() {
66
    let vega = require('vega');
67
    let spec = require('/src/vega/data.json');
66
    const vega = require('vega');
67
    const spec = require('/src/vega/data.json');
68 68

  
69 69
    this.observationService.getObservation({
70 70
      unit_id: this.unitId,
......
75 75
      observations => {
76 76
        spec.data[0].values = observations;
77 77

  
78
        let view = new vega.View(vega.parse(spec), {
78
        const view = new vega.View(vega.parse(spec), {
79 79
          renderer: 'canvas',
80 80
          container: '#view',
81 81
          hover: 'true'}).runAsync();

Také k dispozici: Unified diff