Skip to content

Commit 903df6d

Browse files
committed
merge branch
2 parents a8ed957 + b13819e commit 903df6d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+351
-1247
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ pgdata/
4747
/out/
4848
.designer/designer-theme.css
4949
klass.log*
50-
/.checkstyle
5150
.dccache
5251

5352
**/initdb/*.sql

Makefile

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,19 @@ build-clean-klass-api:
5454
popd; \
5555
${sdk} env clear
5656

57-
.PHONY: run-klass-forvaltning-local
58-
run-klass-forvaltning-local:
59-
pushd klass-forvaltning && \
60-
${sdk} env && \
61-
mvn spring-boot\:run; \
62-
popd; \
63-
${sdk} env clear
64-
6557
.PHONY: run-klass-forvaltning-local-postgres
6658
run-klass-forvaltning-local-postgres:
6759
pushd klass-forvaltning && \
6860
${sdk} env && \
69-
mvn spring-boot\:run -Dspring.profiles.active=postgres-local,hardcoded-user,embedded-solr,frontend,skip-indexing,small-import,ad-offline; \
61+
mvn spring-boot\:run -Dspring-boot.run.profiles=frontend,postgres-local,hardcoded-user,mock-search,mock-mailserver,small-import,skip-indexing; \
7062
popd; \
7163
${sdk} env clear
7264

7365
.PHONY: run-klass-forvaltning-local-postgres-search
7466
run-klass-forvaltning-local-postgres-search:
7567
pushd klass-forvaltning && \
7668
${sdk} env && \
77-
mvn spring-boot\:run -Dspring.profiles.active=postgres-local,hardcoded-user,frontend,skip-indexing,small-import,ad-offline,remote-solr -Dklass.env.search.solr.url=http://localhost:8983/solr/; \
69+
mvn spring-boot\:run -Dspring-boot.run.profiles=frontend,postgres-local,hardcoded-user,mock-mailserver,small-import,skip-indexing,remote-solr -Dklass.env.search.solr.url=http://localhost:8983/solr/; \
7870
popd; \
7971
${sdk} env clear
8072

@@ -83,19 +75,11 @@ run-klass-forvaltning-local-postgres-search:
8375
run-klass-api-local-postgres:
8476
pushd klass-api && \
8577
${sdk} env && \
86-
mvn spring-boot\:run -Dspring.profiles.active=postgres-local,hardcoded-user,embedded-solr,mock-mailserver,api,skip-indexing,small-import,ad-offline; \
78+
mvn spring-boot\:run -Dspring-boot.run.profiles=api,postgres-local,hardcoded-user,mock-search,mock-mailserver,small-import; \
8779
popd; \
8880
${sdk} env clear
8981

9082

91-
# The environment variable KLASS_ENV_SECURITY_IGNORED must be set to "/**" in order to skip authentication
92-
run-klass-api-local-mariadb:
93-
pushd klass-api && \
94-
${sdk} env && \
95-
mvn spring-boot\:run -Dspring.profiles.active=mariadb,hardcoded-user,embedded-solr,mock-mailserver,skip-indexing,small-import,ad-offline; \
96-
popd; \
97-
${sdk} env clear
98-
9983
.PHONY: start-klass-forvaltning-docker
10084
start-klass-forvaltning-docker:
10185
docker compose $(COMPOSE_FILE) --profile frontend up --build -d
@@ -152,7 +136,3 @@ start-klass-api-open-search-docker:
152136
.PHONY: stop-klass-api-open-search-docker
153137
stop-klass-api-open-search-docker:
154138
docker compose $(COMPOSE_FILE) --profile api-open-search down -v
155-
156-
.PHONY: logs-klass-api-open-search-docker
157-
logs-klass-api-open-search-docker:
158-
docker compose $(COMPOSE_FILE) --profile api-open-search logs --tail=100 -f klass-api-open-search

README.md

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,6 @@ klass-forvaltning/target/klass-forvaltning-{Version}.war
2727
klass-solr/klass-solr-{Version}.zip (WiP)
2828
```
2929

30-
## Server configuration
31-
32-
Klass was made with Tomcat in mind and configuration on servers are done in `tomcat.conf` (usually found in ~tomcat/conf)
33-
variables in `application properties` will be overridden/replaced with properties found in `tomcat.conf`
34-
ex. the value for `klass.env.mariadb.password` will be replaced with the value from `KLASS_ENV_MARIADB_PASSWORD`.
35-
36-
please note that `.` is replaced with `_` in the tomcat config.
37-
38-
A typical `tomcat.conf` would contain the following
39-
40-
```
41-
SPRING_PROFILES_ACTIVE=mariadb
42-
KLASS_ENV_MARIADB_INSTANCE=mysql-server
43-
KLASS_ENV_MARIADB_PASSWORD=Password
44-
KLASS_ENV_LOGGING_PATH=/var/log/tomcat
45-
```
46-
4730
## Database
4831

4932
Klass is configured to use Flyway for database initialising and migration.
@@ -81,6 +64,7 @@ This may be done by generating a Personal Access Token (classic) on GitHub with
8164
```
8265

8366
Colima should have at least 5G memory and the project folder must be mounted. Change this in `~/.colima/default/colima.yaml` e.g.
67+
8468
```yaml
8569
memory: 5
8670
...
@@ -98,27 +82,12 @@ Each app has an `.sdkmanrc` file which may be used to configure the Java version
9882
### Klass API
9983

10084
#### Build
85+
10186
Build the app: `make build-klass-api`
10287

10388
#### Docker compose
104-
Service `klass-api` requires a prebuild tagged image.
10589

106-
Run command in `klass-api` module:
107-
```
108-
docker build -t target-postgres-image:latest .
109-
```
110-
This service depends on a Postgresql db container.
111-
112-
For testing with MariaDB build `klass-api` with `klass-shared` version `3.0.5-master-SNAPSHOT`.
113-
114-
This will build klass-api without running tests:
115-
```
116-
mvn clean install -DskipTests -pl klass-api
117-
```
118-
And build mariadb image in klass-api module:
119-
```
120-
docker build -t source-mariadb-image:latest .
121-
```
90+
TODO
12291

12392
### Klass Forvaltning
12493

@@ -142,24 +111,18 @@ below is a quick summary of the profiles available (see _application.properties_
142111
#----------------------
143112
# Profiles for production
144113
# production = no test beans and only Active Directory login
145-
# mariadb = use remote mariaDB database
146114
# remote-solr = use remote Solr server
147115
#
148116
# Profiles for development
149117
# ad-offline = will only use test/embeded AD (apacheDS) [Forvaltning only]
150118
# small-import = imports a small number of classifications from legacy system, useful during development
151119
# mock-mailserver = outgoing emails are only logged
152-
# h2 = use h2 database (stored on your filesystem)
153-
# h2-inmemory = use h2 database but keep everything in memory only.
154120
# embedded-solr = run an instance of solr as part of the application (no need to run a separate solr application)
155121
```
156122
157123
### Build profiles
158124
159-
we have created custom profiles for time consuming tests that can be toggled on and off to help speed up compile time during development.
160125
The profile named `documentation` will generate API documentation with AsciiDoc (default: enabled)
161-
We also have a custom profile (`testbench`) for running GUI tests using TestBench (Vaadin licensed product).
162-
There's also a `checkstyle` and a `findbugs` for use with Jenkins to create code quality reports.
163126
164127
### Run / Debug
165128

build_tools/checkstyle.xml

Lines changed: 0 additions & 164 deletions
This file was deleted.

0 commit comments

Comments
 (0)