Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
version: '3'
services:
db:
image: postgres:10
image: postgres:15
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
POSTGRES_USER: patternatlas
POSTGRES_PASSWORD: patternatlas
POSTGRES_DB: patternatlas
ports:
- "5432:5432"
- "5060:5432"
networks:
- default
networks:
Expand Down
31 changes: 16 additions & 15 deletions docs/dev/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,22 @@ This is achieved through using the OAuth 2.0 Authentication Code Flow, additiona
It runs on Port 8081

### Development
1. Clone the repository `git clone https://github.com/PatternAtlas/pattern-pedia-auth.git`.
2. Navigate to repository directory `cd pattern-pedia-auth/`.
2. Build the repository
- `mvn package -DskipTests`(Windows) (skiping the tests for a faster build), Java 8 required.
- `./mvnw clean package -DskipTests`(Unix) (skiping the tests for a faster build), Java 8 required.
#### Docker Installation
3. Build the image `docker build -t patternpedia/auth .` ([Docker](https://docs.docker.com/get-docker/) required)

##### Auth & DB
4. Navigate to directory `..\.docker\`
5. Insert the following commands `docker-compose -f docker-compose-with-db.yml up -d`

##### Auth
4. Navigate to directory `..\.docker\`
5. Insert the following commands `docker-compose up -d`

1. Run the maven build `mvn package -DskipTests`
2. Clone the contents repository `git clone https://github.com/PatternAtlas/pattern-atlas-content`.
3. Clone the Docker repository `git clone https://github.com/PatternAtlas/pattern-atlas-docker`
4. Setup IntelliJ to also use the contents repository in the deployment. :warning: you MUST use the _Applicaition_ run configuration, not _Spring Boot_!
![Run-Configuration](IntelliJ-run-config.png)
5. Start the development configuration using docker compose:
1. Change into the docker compose repository
2. Run the following command `docker-compose -f docker-compose.dev.yml up -d`
6. Run the Pattern Atlas using IntelliJ
7. Go to <http://localhost:7080/> and login with user admin and password admin
8. Add a user by ONLY specifying her name
9. Afterwards, under the _Credentials_ tab, you can set a password for this user. Make sure to set the `Temporary` flag to `false`!
10. Start the UI (either using Docker or local setup)
11. Go to <http://localhost:1978> and login. The first user is automatically assigned to the ADMIN role.


#### IntelliJ
3. [Follow PatternAtlasAPI from Step 5 pls](#step5)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,10 @@ public class Pattern extends EntityWithURI {
@Type(type = "jsonb")
@Column(columnDefinition = "jsonb")
private Object renderedContent;

@Column(columnDefinition = "boolean default false")
private Boolean deploymentModelingStructurePattern;

@Column(columnDefinition = "boolean default false")
private Boolean deploymentModelingBehaviorPattern;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.util.UUID;

import com.fasterxml.jackson.annotation.JsonIgnore;

import io.github.patternatlas.api.entities.Pattern;
import io.github.patternatlas.api.entities.PatternLanguage;
import lombok.Data;
Expand All @@ -27,6 +26,9 @@ public class PatternModel {

protected String patternLanguageName;

private Boolean deploymentModelingBehaviorPattern;
private Boolean deploymentModelingStructurePattern;

@JsonIgnore
protected Pattern pattern;

Expand All @@ -39,6 +41,8 @@ private PatternModel(Pattern pattern) {
PatternLanguage patternLanguage = pattern.getPatternLanguage();
this.patternLanguageId = patternLanguage.getId();
this.patternLanguageName = patternLanguage.getName();
this.deploymentModelingBehaviorPattern = pattern.getDeploymentModelingBehaviorPattern();
this.deploymentModelingStructurePattern = pattern.getDeploymentModelingStructurePattern();
}

public static PatternModel from(Pattern pattern) {
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
server.port=1977
spring.datasource.url=jdbc:postgresql://localhost:5432/patternatlas
spring.datasource.url=jdbc:postgresql://localhost:5060/patternatlas
spring.datasource.username=patternatlas
spring.datasource.password=patternatlas
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
Expand All @@ -12,7 +12,7 @@ springdoc.default-produces-media-type=application/hal+json
# alt: AUTH-Server
# security.oauth2.resource.jwk.key-set-uri=http://localhost:8081/.well-known/jwks.json
# neu: Keycloak
security.oauth2.resource.jwk.key-set-uri=http://localhost:8080/realms/patternatlas/protocol/openid-connect/certs
security.oauth2.resource.jwk.key-set-uri=http://localhost:7080/realms/patternatlas/protocol/openid-connect/certs
#okta.oauth2.issuer=https://dev-918271.okta.com/oauth2/default
#okta.oauth2.clientId=0oa1eflyl1wZDVLLg357
#----------------------------
Expand All @@ -23,7 +23,7 @@ io.github.patternatlas.api.latexrenderer.port=5030
# Embedded Tomcat
server.servlet.contextPath=/patternatlas
# liquibase file
spring.liquibase.change-log=patternatlas.xml
spring.liquibase.change-log=patternatlas_full.xml
# DB debug logs
spring.jpa.show-sql=false
spring.jpa.properties.hibernate.show_sql=false
spring.jpa.properties.hibernate.show_sql=false