Skip to content

Commit 39e3690

Browse files
author
Dennis Labordus
committed
Added SCL Validator to Docker Compose.
Signed-off-by: Dennis Labordus <[email protected]>
1 parent 45de2a6 commit 39e3690

File tree

6 files changed

+51
-5
lines changed

6 files changed

+51
-5
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@ target
88
# IDE specific
99
.idea
1010
*.iml
11+
12+
# Data Directories for Docker Compose
13+
# Ignore all files, except the README.md
14+
compas/data/**/*.*
15+
!compas/data/**/README.md

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,21 @@ docker-compose -f compas/docker-compose-postgresql.yml down -v
6969

7070
The option '-v' also removes the volumes created, so all data is lost with this option.
7171

72+
## Docker Compose (Common)
73+
74+
### Custom files
75+
76+
The SCL Validator Service can be extended with custom OCL and NSDOC Files. These can be placed in specific directories,
77+
see [OCL Files](compas/data/ocl/README.md) and [NSDOC Files](compas/data/nsdoc/README.md).
78+
7279
### Known issue with Docker Compose
7380

7481
Using the current configuration with Keycloak and OpenResty (lua-resty-session) sometimes gives an error
7582
"**state from argument does not match state restored from session**".
7683
This mostly happens after using logout or the session is expired. The login page is shown, but after login this error is shown.
7784
Just open the url [http://localhost/](http://localhost/) again and OpenSCD is shown again, also being logged in.
7885

79-
## Keycloak Demo Configuration
86+
### Keycloak Demo Configuration
8087
For demo purposes, a [demo Keycloak configuration](compas/keycloak/keycloak_compas_realm.json) is created which can be imported when
8188
running a Keycloak instance.
8289

compas/data/nsdoc/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
This directory can be used to add NSDOC Files to be served by the SCL Validator Service for the frontend application.
2+
3+
For instance
4+
```
5+
compas/data
6+
└── nsdoc
7+
├── Official-File73.nsdoc
8+
└── README.md
9+
```

compas/data/ocl/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
This directory can be used to add custom OCL Files to the validation process.
2+
3+
You can use subdirectories like `SemanticConstraints` as RiseClipse is doing.
4+
And there is a special filter that when you create a directory `FileSpecifics`.
5+
In this directory you can create for instance a directory `CID` to put constraints specific for an SCL File Type.
6+
Known types are `SSD`, `IID`, `ICD`, `SCD`, `CID`, `SED`, `ISD`, `STD`.
7+
8+
For instance,
9+
10+
```
11+
compas/data
12+
└── ocl
13+
├── FileSpecifics
14+
│ └── CID
15+
│ └── Busbar.ocl
16+
├── README.md
17+
└── SemanticConstraints
18+
└── Busbar.ocl
19+
```

compas/docker-compose-basex.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ services:
111111
scl-validator:
112112
labels:
113113
compas: true
114-
image: "lfenergy/compas-scl-validator:local-SNAPSHOT"
114+
image: "lfenergy/compas-scl-validator:0.1.0"
115115
ports:
116116
- "9093:8080"
117117
environment:
@@ -129,13 +129,16 @@ services:
129129
interval: 15s
130130
timeout: 10s
131131
retries: 5
132+
volumes:
133+
- ./data/ocl:/data/ocl
134+
- ./data/nsdoc:/data/nsdoc
132135
depends_on:
133136
- keycloak
134137

135138
open-scd:
136139
labels:
137140
compas: true
138-
image: "lfenergy/compas-open-scd:v0.12.0.0"
141+
image: "lfenergy/compas-open-scd:v0.12.0.1"
139142
healthcheck:
140143
test: ["CMD", "curl", "-f", "http://localhost/"]
141144
interval: 30s

compas/docker-compose-postgresql.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ services:
118118
scl-validator:
119119
labels:
120120
compas: true
121-
image: "lfenergy/compas-scl-validator:local-SNAPSHOT"
121+
image: "lfenergy/compas-scl-validator:0.1.0"
122122
ports:
123123
- "9093:8080"
124124
environment:
@@ -136,13 +136,16 @@ services:
136136
interval: 15s
137137
timeout: 10s
138138
retries: 5
139+
volumes:
140+
- ./data/ocl:/data/ocl
141+
- ./data/nsdoc:/data/nsdoc
139142
depends_on:
140143
- keycloak
141144

142145
open-scd:
143146
labels:
144147
compas: true
145-
image: "lfenergy/compas-open-scd:v0.12.0.0"
148+
image: "lfenergy/compas-open-scd:v0.12.0.1"
146149
healthcheck:
147150
test: ["CMD", "curl", "-f", "http://localhost/"]
148151
interval: 30s

0 commit comments

Comments
 (0)