File tree Expand file tree Collapse file tree 4 files changed +11
-3
lines changed Expand file tree Collapse file tree 4 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ module.exports = {
5
5
'es6' : true ,
6
6
'node' : false
7
7
} ,
8
+ 'globals' : {
9
+ 'process' : true
10
+ } ,
8
11
'plugins' : [
9
12
'react'
10
13
] ,
Original file line number Diff line number Diff line change 1
1
FROM node:18-alpine as build
2
2
3
+ ARG NGSI_URL
4
+ ENV NGSI_URL $NGSI_URL
5
+
3
6
WORKDIR /usr/src/app
4
7
5
8
# Install app dependencies
Original file line number Diff line number Diff line change @@ -13,12 +13,11 @@ import { addAlertAnimationToSource } from '../lib/ol-alert-animation';
13
13
import { setSpecialLayerStyle } from '../lib/ol-layer-style' ;
14
14
15
15
export default function AddEntities ( ) {
16
-
17
16
const [ show , setShow ] = useState ( false ) ;
18
17
const handleClose = ( ) => setShow ( false ) ;
19
18
const handleShow = ( ) => setShow ( true ) ;
20
19
21
- const [ url , setUrl ] = useState ( 'http://localhost:2026 ' ) ;
20
+ const [ url , setUrl ] = useState ( process . env . NGSI_URL || 'http://localhost:1026 ' ) ;
22
21
const handleUrlChanged = ( e ) => {
23
22
e . preventDefault ( ) ;
24
23
setUrl ( e . target . value ) ;
Original file line number Diff line number Diff line change 1
1
2
2
services :
3
3
app :
4
- build : ./
4
+ build :
5
+ context : .
6
+ args :
7
+ - NGSI_URL=http://localhost:2026
5
8
ports :
6
9
- " 1234:80"
You can’t perform that action at this time.
0 commit comments