Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Please follow the instruction with cloning just the catalogue_qt_docker.

Info

Make sure that you clones the repo and you have access to catalog_qt_2' codes in /build folder and you can succesfully login to rhus-71.man.poznan.pl

, dont

.

Dont build anything yet!


Our app includes 4 components:

...

  1. docker-compose with keycloak authentication and HTTPS settings both enabled, swagger-ui.authorization.header=true
  2. docker-compose with keycloak authentication enabled and HTTPS settings disabled, swagger-ui.authorization.header=true
  3. docker-compose with keycloak authentication disabled and HTTPS settings enabled, swagger-ui.authorization.header=false
  4. docker-compose with keycloak authentication and generated HTTPS settings both disabled, swagger-ui.authorization.header=false

the same for single container:

...


Example of application.properties file for docker-compose:


Code Block
# The host is 'db' not localhost!
spring.datasource.url=jdbc:mysql://db:3306/itm_catalog_qt?serverTimezone=UTC

spring.datasource.username=itm_catalog_rw
spring.datasource.password=itm_catalog_rw
spring.jpa.properties.hibernate.jdbc.time_zone=UTC

server.error.include-message=always
spring.mvc.dispatch-options-request=true

spring.jpa.show-sql=false
spring.jpa.hibernate.ddl-auto=none

# This is additional http handler, on another port
server.port=8080
server.http.port=8081
server.http.interface=0.0.0.0

# ------ Keycloak settings -------
# If you plan to use Keycloak authorization, make sure to uncomment this one 

keycloak.realm = fair4fusion-docker-demo
keycloak.auth-server-url=https://sso.apps.paas-dev.psnc.pl/
keycloak.resource= catalogqt-cli
keycloak.realm-key= MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjOCDGJsBi7rxVjf0RQb8pm0LAGsEKFcH7g7mKSqpFvp1uOypUeiYe5dwlwkXAXaYeYs0J70LB8E6mtVUcykbmp+XrqD1nn3yfPxlVLSg7iCvJqMUq8udsUbsyT3M/32/kssXurgY7rX5JhdtkYeAgq+9ifIjLQZhALg+FvEsX9C+D30WQDAChEljlReb+Y4UTz2aIqz9C+90bqG1ZIX4o3Dli1PZDosTNM444CwDTbrFrenctOTDtGPodo9k2jze8McZFAIrdUYi9mKD8v0frs8NUUW/TQj9h62swXdvVAfzYTd+R7aMRG0eXMV3rJc38DfsCsF7bkqSg0b4l8GcaQIDAQAB
keycloak.bearer-only = true
keycloak.public-client=true
keycloak.principal-attribute=preferred_username


# ------ Bearer token authorization settings -------
# If you plan to send autorization token, make sure to make this one 'true'

swagger-ui.authorization.header=true 

# ------ HTTPS settings -------
# If you plan to use HTTPS, make sure to uncomment this one

#server.ssl.key-store=file:///home/imas/cert/keystore.p12
#server.ssl.key-store-password=catalogqt
#server.ssl.keyStoreType=PKCS12
#server.ssl.keyAlias=tomcat




the same for single container:

  1. single-container with keycloak authentication and HTTPS settings both enabled, swagger-ui.authorization.header=true
  2. single-container with keycloak authentication enabled and HTTPS settings disabled, swagger-ui.authorization.header=true
  3. single-container with keycloak authentication disabled and HTTPS settings enabled, swagger-ui.authorization.header=false,
  4. single-container  with keycloak authentication and generated HTTPS settings both disabled, swagger-ui.authorization.header=false


Example of application.properties file for single-container:

Code Block
# The host is localhost
spring.datasource.url=jdbc:mysql://localhost:3306/itm_catalog_qt?serverTimezone=UTC

spring.datasource.username=itm_catalog_rw
spring.datasource.password=itm_catalog_rw
spring.jpa.properties.hibernate.jdbc.time_zone=UTC

server.error.include-message=always
spring.mvc.dispatch-options-request=true

spring.jpa.show-sql=false
spring.jpa.hibernate.ddl-auto=none

# This is additional http handler, on another port
server.port=8080
server.http.port=8081
server.http.interface=0.0.0.0

# ------ Keycloak settings -------
# If you plan to use Keycloak authorization, make sure to uncomment this one 

keycloak.realm = fair4fusion-docker-demo
keycloak.auth-server-url=https://sso.apps.paas-dev.psnc.pl/
keycloak.resource= catalogqt-cli
keycloak.realm-key= MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjOCDGJsBi7rxVjf0RQb8pm0LAGsEKFcH7g7mKSqpFvp1uOypUeiYe5dwlwkXAXaYeYs0J70LB8E6mtVUcykbmp+XrqD1nn3yfPxlVLSg7iCvJqMUq8udsUbsyT3M/32/kssXurgY7rX5JhdtkYeAgq+9ifIjLQZhALg+FvEsX9C+D30WQDAChEljlReb+Y4UTz2aIqz9C+90bqG1ZIX4o3Dli1PZDosTNM444CwDTbrFrenctOTDtGPodo9k2jze8McZFAIrdUYi9mKD8v0frs8NUUW/TQj9h62swXdvVAfzYTd+R7aMRG0eXMV3rJc38DfsCsF7bkqSg0b4l8GcaQIDAQAB
keycloak.bearer-only = true
keycloak.public-client=true
keycloak.principal-attribute=preferred_username


# ------ Bearer token authorization settings -------
# If you plan to send autorization token, make sure to make this one 'true'

swagger-ui.authorization.header=true 

# ------ HTTPS settings -------
# If you plan to use HTTPS, make sure to uncomment this one

#server.ssl.key-store=file:///home/imas/cert/keystore.p12
#server.ssl.key-store-password=catalogqt
#server.ssl.keyStoreType=PKCS12
#server.ssl.keyAlias=tomcat



...


 Debugging

In our application we have several different debugging paths depending on the docker environment and what you want to debug.

...