You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Containing tools / configurations for deploying CoMPAS services.
12
12
13
-
## Docker Compose
14
-
There is a pre configured [Docker Compose](compas/docker-compose.yml) file, which starts all the given CoMPAS services.
15
-
To start all configured services, go to the `compas` directory and run the following two commands:
13
+
## Docker Compose (BaseX)
14
+
There is a pre configured [Docker Compose](compas/docker-compose-basex.yml) file, which starts all the given CoMPAS services.
15
+
To start all configured services using BaseX, run the following two commands:
16
16
17
17
```
18
18
# Build (if needed) and start all the containers in the background.
19
-
docker-compose up -d --build
19
+
docker-compose -f compas/docker-compose-basex.yml up -d --build
20
20
```
21
21
22
-
This first command builds 2 containers (keycloak and reverse proxy) and next command starts all CoMPAS services at the same time.
22
+
This command will first build the custom images for Keycloak and the Reverse Proxy and then start all containers.
23
+
To know if all containers are running execute the shell script "bin/docker-wait-on-containers.sh".
24
+
This script will wait until all containers are running.
25
+
23
26
Now, the following services are available:
24
27
25
28
- open-scd, available at [http://localhost/](http://localhost/).
@@ -36,16 +39,42 @@ To stop and remove all the containers run the command:
36
39
37
40
```
38
41
# Stop all containers and remove the volumes.
39
-
docker-compose down -v
42
+
docker-compose -f compas/docker-compose-basex.yml down -v
43
+
```
44
+
45
+
The option '-v' also removes the volumes created, so all data is lost with this option.
46
+
47
+
## Docker Compose (PostgreSQL)
48
+
There is a pre configured [Docker Compose](compas/docker-compose-postgresql.yml) file, which starts all the given CoMPAS services.
49
+
To start all configured services using PostgreSQL, run the following two commands:
50
+
51
+
```
52
+
# Build (if needed) and start all the containers in the background.
53
+
docker-compose -f compas/docker-compose-postgresql.yml up -d --build
54
+
```
55
+
56
+
This command will first build the custom images for Keycloak and the Reverse Proxy and then start all containers.
57
+
To know if all containers are running execute the shell script "bin/docker-wait-on-containers.sh".
58
+
This script will wait until all containers are running.
59
+
60
+
The URLs are the same as for the BaseX version, except of course the BaseX Container. This is now a PostgreSQL
61
+
container. The PostgreSQL container is available at port 5432.
62
+
63
+
To stop and remove all the containers run the command:
64
+
65
+
```
66
+
# Stop all containers and remove the volumes.
67
+
docker-compose -f compas/docker-compose-postgresql.yml down -v
40
68
```
41
69
42
70
The option '-v' also removes the volumes created, so all data is lost with this option.
43
71
44
72
### Known issue with Docker Compose
45
73
46
-
Using the current configuration with Keycloak and OpenResty (lua-resty-session) sometimes gives an error "**state from argument does not match state restored from session**".
74
+
Using the current configuration with Keycloak and OpenResty (lua-resty-session) sometimes gives an error
75
+
"**state from argument does not match state restored from session**".
47
76
This mostly happens after using logout or the session is expired. The login page is shown, but after login this error is shown.
48
-
Just open the url [http://localhost/](http://localhost/) again and OpenSCD is shown again also being logged in.
77
+
Just open the url [http://localhost/](http://localhost/) again and OpenSCD is shown again, also being logged in.
49
78
50
79
## Keycloak Demo Configuration
51
80
For demo purposes, a [demo Keycloak configuration](compas/keycloak/keycloak_compas_realm.json) is created which can be imported when
@@ -56,7 +85,8 @@ The following Keycloak attributes have been added:
56
85
-**OpenSCD client**: A client has been made for interacting with OpenSCD.
57
86
-**SCL Data Service client**: A client has been made for interacting with the SCL Data Service.
58
87
-**CRUD roles for the SCL Data Service**: Create, Read, Update and Delete roles have been added to the SCL Data Service client.
59
-
When interacting with the SCL Data Service, a JWT token needs to have certain roles before interaction is possible. These roles are assigned to certain users (see below).
88
+
When interacting with the SCL Data Service, a JWT token needs to have certain roles before interaction is possible.
89
+
These roles are assigned to certain users (see below).
60
90
-**CoMPAS Group**: A CoMPAS demo group has been added.
61
91
-**A Demo User**: A Demo user without specific roles.
0 commit comments