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
@@ -45,33 +45,115 @@ Tiamat also includes a diff tool. This is used to compare and show the differenc
45
45
46
46
## Build
47
47
48
-
`mvn clean install`
48
+
```shell
49
+
mvn clean install
50
+
```
49
51
50
52
You need the directory `/deployments/data` with rights for the user who
51
53
performs the build.
52
54
53
-
54
-
55
-
56
55
## Integration tests
57
56
Tiamat uses testcontainers to run integration tests against a real database. To run Testcontainers-based tests, you need a Docker-API compatible container runtime
58
57
for more detail see https://www.testcontainers.org/supported_docker_environment/
59
58
60
59
(default profiles are set in application.properties)
61
60
61
+
## Running the service
62
+
63
+
There are several options for running the service depending on what you need.
64
+
65
+
-[Run locally for development](#run-locally-for-development) is for people intending to maintain, modify and improve
66
+
tiamat's source code
67
+
-[Run tiamat with Docker compose](#run-tiamat-with-docker-compose) if you just need to get the service running
68
+
-[Run with external properties file and PostgreSQL](#run-with-external-properties-file-and-postgresql) for low
69
+
level debugging
70
+
71
+
> **Note!** Each of these configurations use unique port numbers and such, be sure to read the provided documentation
72
+
> and configuration files for more details.
73
+
74
+
## Run locally for development
75
+
76
+
Local development is a combination of using Docker Compose based configuration for starting up the supporting
77
+
services and running Spring Boot with at least `local` profile enabled.
78
+
79
+
When running,
80
+
81
+
- tiamat will be available at `http://localhost:37888`
82
+
- PostGIS will be available at `localhost:37432`
83
+
84
+
### 1. Start Local Environment through Docker Compose
85
+
86
+
Tiamat has [docker-compose.yml](./docker-compose.yml) which contains all necessary dependent services for running tiamat in
87
+
various configurations. It is assumed this environment is always running when the service is being run locally
88
+
(see below).
89
+
90
+
> **Note!** This uses the compose version included with modern versions of Docker, not the separately installable
91
+
> `docker-compose` command.
92
+
93
+
All Docker Compose commands run in relation to the `docker-compose.yml` file located in the same directory in which the
94
+
command is executed.
95
+
96
+
```shell
97
+
# run with defaults - use ^C to shutdown containers
98
+
docker compose up
99
+
# run with additional profiles, e.g. with LocalStack based AWS simulator
100
+
docker compose --profile aws up
101
+
# run in background
102
+
docker compose up -d # or --detach
103
+
# shutdown containers
104
+
docker compose down
105
+
# shutdown containers included in specific profile
106
+
docker compose --profile aws down
107
+
```
108
+
109
+
See [Docker Compose reference](https://docs.docker.com/compose/reference/) for more details.
110
+
111
+
### 2. Run the Service
112
+
113
+
#### Available Profiles
114
+
115
+
> **Note!** You must choose at least one of the options from each category below!
116
+
117
+
> **Note!**`local` profile must always be included!
|`local-changelog`| Simple local implementation which logs the sent events to `stdout`|
131
+
|`activemq`| JMS based ActiveMQ implementation. |
132
+
|`google-pubsub`| GCP PubSub implementation for publishing tiamat entity changes. |
133
+
134
+
#### Run It!
135
+
136
+
**IntelliJ**: Right-click on `TiamatApplication.java` and choose Run (or Cmd+Shift+F10). Open Run -> Edit
137
+
configurations, choose the correct configuration (Spring Boot -> App), and add a comma separated list of desired
138
+
profiles (e.g. `local,local-blobstore,activemq`) to Active profiles. Save the configuration.
139
+
140
+
**Command line**: `mvn spring-boot:run`
141
+
62
142
## Run tiamat with Docker compose
63
143
To run Tiamat with Docker compose, you need to have a docker-compose.yml file. In docker-compose folder you will find a compose.yml file.:
64
-
```
144
+
145
+
```shell
65
146
docker compose up
66
147
```
148
+
67
149
This will start Tiamat with PostgreSQL and Hazelcast. and you can access Tiamat on http://localhost:1888 and the database on http://localhost:5433
68
150
and graphiql on http://localhost:8777/services/stop_places/graphql , At start up tiamat copy empty schema to the database. Spring properties are set in application.properties.
69
151
Security is disabled in this setup.
70
152
71
153
## Run with external properties file and PostgreSQL
72
-
To run with PostgreSQL you ned an external application.properties.
73
-
Below is an example of application.properties:
74
-
```
154
+
To run with PostgreSQL you need an external `application.properties`. Below is an example of `application.properties`:
# Disable feature detection by this undocumented parameter. Check the org.hibernate.engine.jdbc.internal.JdbcServiceImpl.configure method for more details.
To start Tiamat with this configuration, specify **spring.config.location**:
@@ -210,13 +264,6 @@ To start Tiamat with this configuration, specify **spring.config.location**:
210
264
Tiamat is using HikariCP. Most properties should be be possible to be specified in in application.properties, like `spring.datasource.initializationFailFast=false`. More information here. https://github.com/brettwooldridge/HikariCP/wiki/Configuration
211
265
See also http://stackoverflow.com/a/26514779
212
266
213
-
### Postgres
214
-
215
-
#### Run postgres/gis for tiamat in docker for development
When importing with _importType=INITIAL_, a parallel stream will be created, spawning the original process. During import, user authorizations is checked, thus accessing SecurityContextHolder.
385
432
By default, SecurityContextHolder use DEFAULT\_LOCAL\_STRATEGY. When using INITIAL importType, you should tell Spring to use MODE\_INHERITABLETHREADLOCAL for SecurityContextHolder, allowing Spring to duplicate Security Context in spawned threads.
0 commit comments