Skip to content

Commit e84f711

Browse files
committed
Update docker demo script.
1 parent 02e7946 commit e84f711

File tree

2 files changed

+30
-40
lines changed

2 files changed

+30
-40
lines changed

demo-docker/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ docker-compose -f docker-compose.yaml up
3838

3939
Wait until images are pulled, the databases are seeded and the protocol communication begins.
4040

41-
Open http://localhost:8080 on a browser (Chrome, Safari or Firefox).
41+
Open http://127.0.0.1/login/login.html on a browser (Chrome, Safari or Firefox).
4242

4343
Login credentials are user="admin" and password="jsonscada".
4444

demo-docker/docker-compose.yaml

+29-39
Original file line numberDiff line numberDiff line change
@@ -110,23 +110,23 @@ services:
110110
volumes:
111111
- ./grafana_data:/var/lib/grafana
112112
environment:
113-
- GF_SERVER_DOMAIN=127.0.0.1
113+
- GF_SERVER_DOMAIN=grafana
114114
- GF_SERVER_ROOT_URL=%(protocol)s://%(domain)s:8080/grafana/
115115
- GF_SERVER_SERVE_FROM_SUB_PATH=false
116116
- GF_AUTH_PROXY_ENABLED=true
117117
- GF_AUTH_PROXY_ENABLE_LOGIN_TOKEN=true
118118
- GF_AUTH_DISABLE_SIGNOUT_MENU=true
119-
- GF_AUTH_PROXY_WHITELIST=127.0.0.1
119+
# - GF_AUTH_PROXY_WHITELIST=127.0.0.1
120120
- GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION=true
121-
- GF_SERVER_HTTP_ADDR="127.0.0.1"
121+
- GF_SERVER_HTTP_ADDR=0.0.0.0
122122
- GF_SERVER_ENFORCE_DOMAIN=true
123123
- GF_SERVER_ENABLE_GZIP=true
124124
- GF_ANALYTICS_REPORTING_ENABLED=false
125125
- GF_ANALYTICS_CHECK_FOR_UPDATES=false
126126
- GF_SECURITY_ALLOW_EMBEDDING=true
127127
- GF_DATABASE_TYPE=postgres
128128
- GF_DATABASE_NAME=grafanaappdb
129-
- GF_DATABASE_HOST=127.0.0.1
129+
- GF_DATABASE_HOST=timescaledb:5432
130130
- GF_DATABASE_USER=postgres
131131
- GF_DATABASE_PASSWORD=
132132
#- GF_AUTH_PROXY_HEADER_NAME=X-WEBAUTH-USER
@@ -138,7 +138,7 @@ services:
138138
- 3000:3000
139139
expose:
140140
- "3000"
141-
links:
141+
depends_on:
142142
- timescaledb
143143
networks:
144144
- jsdemo_net
@@ -240,7 +240,6 @@ services:
240240
networks:
241241
- jsdemo_net
242242

243-
244243
# OPC-UA Server
245244
opcua_server:
246245
image: node:20-alpine
@@ -259,36 +258,6 @@ services:
259258
networks:
260259
- jsdemo_net
261260

262-
# realtime web server, will listen on some HTTP port NO AUTH/RBAC
263-
#server_realtime:
264-
# image: node:20-alpine
265-
# container_name: jsdemo_server_realtime
266-
# command: sh -c "cd /server_realtime && sleep 10 && node index.js"
267-
# restart: unless-stopped
268-
# environment:
269-
# - JS_IP_BIND=0.0.0.0
270-
# - JS_HTTP_PORT=8080
271-
# - JS_GRAFANA_SERVER=http://jsdemo_grafana:3000
272-
# - JS_AUTHENTICATION=NOAUTH
273-
# - PGPORT=5432
274-
# - PGHOST=jsdemo_timescaledb
275-
# - PGDATABASE=json_scada
276-
# - PGUSER=json_scada
277-
# - PGPASSWORD=
278-
# volumes:
279-
# - ../src/server_realtime:/server_realtime
280-
# - ../src/htdocs:/htdocs
281-
# - ./conf:/conf
282-
# links:
283-
# - jsdemo_mongorsn1
284-
# # exports the HTTP port to the main host
285-
# ports:
286-
# - 8080:8080
287-
# expose:
288-
# - "8080"
289-
# networks:
290-
# - jsdemo_net
291-
292261
# realtime web server, will listen on some HTTP port with auth, RBAC management UI
293262
server_realtime:
294263
image: node:20-alpine
@@ -298,7 +267,7 @@ services:
298267
environment:
299268
- JS_IP_BIND=0.0.0.0
300269
- JS_HTTP_PORT=8080
301-
- JS_GRAFANA_SERVER=http://jsdemo_grafana:3000
270+
- JS_GRAFANA_SERVER=http://grafana:3000
302271
- PGPORT=5432
303272
- PGHOST=jsdemo_timescaledb
304273
- PGDATABASE=json_scada
@@ -312,6 +281,7 @@ services:
312281
- ./conf:/conf
313282
links:
314283
- jsdemo_mongorsn1
284+
- grafana
315285
# exports the HTTP port to the main host
316286
ports:
317287
- 8080:8080
@@ -337,7 +307,7 @@ services:
337307
# Dnp3 client: requires wine as it is currently Windows-only
338308
dnp3_client_wine:
339309
image: scottyhardy/docker-wine:latest
340-
container_name: js_dnp3_client_wine
310+
container_name: jsdemo_dnp3_client_wine
341311
command: sh -c "cd /jsonscada_bin/ && sleep 30 && xvfb-run wine Dnp3Client.exe 1 1"
342312
restart: unless-stopped
343313
links:
@@ -351,7 +321,7 @@ services:
351321
# # another option via proton-ge
352322
# dnp3_client_wine:
353323
# image: mtapiio/wine8:latest
354-
# container_name: js_dnp3_client_wine
324+
# container_name: jsdemo_dnp3_client_wine
355325
# command: sh -c "dpkg --add-architecture i386 &&
356326
# apt update && apt dist-upgrade -y &&
357327
# apt install -y libc6:i386 libx11-6:i386 libdbus-1-dev:i386 libfreetype6:i386 &&
@@ -390,6 +360,26 @@ services:
390360
# networks:
391361
# - jsdemo_net
392362

363+
nginx:
364+
image: nginx:latest
365+
container_name: jsdemo_nginx
366+
ports:
367+
- "80:80"
368+
expose:
369+
- "80"
370+
volumes:
371+
- ./conf/nginx.conf:/etc/nginx/nginx.conf
372+
- ./conf/fastcgi.conf:/etc/nginx/fastcgi.conf
373+
- ./conf/nginx-conf.d:/etc/nginx/conf.d
374+
- ../src/htdocs:/htdocs
375+
- ../src/htdocs-admin:/htdocs-admin
376+
- ../src/htdocs-login:/htdocs-login
377+
restart: unless-stopped
378+
links:
379+
- server_realtime
380+
networks:
381+
- jsdemo_net
382+
393383
networks:
394384
jsdemo_net:
395385
driver: bridge

0 commit comments

Comments
 (0)