Versions Compared

Key

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

Work in Progress

This article explains the needed steps to migrate from 4.x and 5.x to 6.x

Logging

!?Is the logback.xml needed before first start?!

No the custom logging configuration is optional. see https://portrait.atlassian.net/wiki/spaces/PA/pages/93028539/General+settings#Custom-Logging-Configuration-(Since-6.X)

Thomas Körbler I think we can remove that from the migration. It's an optional feature, we can promote that as a new config in the general release notes if we want. But for migration, it can just be ignored.

Theming

The theming was adopted, and new properties were introduced.

Old

Code Block
application:
  theme:
    logoUrl: /icons/logo-full.svg
    heroUrl: /icons/logo-hero.svg
    highlightColor: "#0097A9"
    globalBackgroundColor: "#F8F8F8"
    globalFontColor: "#333F48"
    menuBackgroundColor: "#FFFFFF"
    menuFontColor: "#333F48"

New

Code Block
application:
  theme:
    logoUrl: /icons/logo-full.svg
    heroUrl: /icons/logo-hero.svg
    highlightColor: "#0097A9"
    backgroundColor: "#F8F8F8"
    textColor: "#333F48"
    alternateBackgroundColor: "#FFFFFF"
    labelColor: "#333F48"
    dividerColor: "#EAEAEA"

Since the attributes have changed, we recommend reset the theming settings and start from scratch.

See more details here: Theming

API Sections

Since 6.x each section requires its own source. Therefore, all sections that previously didn't had any source configured, usually these were the API sources, needs to be configured.

Example:

Code Block
languageyaml
sections:
  section:
    - name: apa-ots
          caption: APA OTS
          type: list
          sortField: date
          sortOrder: desc
          description: |
            APA-OTS ist Österreichs stärkster Verbreiter von multimedialen Presseinformationen in Text, Bild, Video und Audio im In- und Ausland.
            APA-Comm bietet hocheffiziente Lösungen für die PR- und Kommunikationsbranche: Produktion (Foto, Video, Grafik), Verbreitung von Presseinformationen, Mediendatenbank, Medienbeobachtung, Social Media Monitoring und Erfolgsmessung.
          columns:
            - label: 'Titel'
              key: 'name'
              type: 'string'
              showInTableHeader: true
              showInDetailList: false
          ....
  sources:
    source:
      - id: apa-ots
      sourceType: 'api'
      excludeKeysFromSuggestions: [ ]

ENV Variable

The optional application property ENV was added.

This should be set to ‘dev' for Can be skipped for production environments, default value is ‘prod’.
For development and demo instances and ‘prod’ for customer instancesseeit can be set to ‘dev’

Details:

https://portrait.atlassian.net/wiki/spaces/PA/pages/93028539/General+settings#Settings

Example:

Code Block
languageyaml
application:
  name: Portrait App
  owner: Treskon GmbH
  env: dev

Update of nginx.config

The path for Swagger-UI changed:

  1. Remove old /swagger locationAdd a new location

    Code Block
    location /swagger {
      proxy_pass http://swagger:8080/swagger;
    }
  2. Add new locations

Code Block
location /v3/api-docs {
    proxy_pass http://backend:8080;
    proxy_pass_request_headers on;
    proxy_pass_request_body on;
    proxy_buffering off;
    proxy_set_header X-real-IP $remote_addr;
}
  1. Change the swagger location

from

Code Block
location /swagger

location /api-docs/ {
  proxy_pass http://swagger:8080/swagger;

to

Code Block
rewrite ^/swagger/?$ /swagger/index.html permanent;
location /swaggerbackend:8080/api-docs/;
  proxy_buffering off;
  proxy_set_header X-real-IP $remote_addr;
  add_header 'Access-Control-Allow-Origin' '*';
  add_header 'Access-Control-Allow-Credentials' 'true';
  add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
  add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';
}

location /swagger-ui/ {
  proxy_pass http://backend:8080/swagger-ui/;
Note
Make sure to add the trailing slash
;
  proxy_buffering off;
  proxy_set_header X-real-IP $remote_addr;
  add_header 'Access-Control-Allow-Origin' '*';
  add_header 'Access-Control-Allow-Credentials' 'true';
  add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
  add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';
}

Update of docker-compose

Swagger-UI is not directly served from the backend. Therefore, the service can be removed entirely.

Remove these lines:

Code Block
swagger:
    image: swaggerapi/swagger-ui
    ports:
      - "30010:8080"
    environment:
      SWAGGER_JSON: /swagger.json
      BASE_URL: /swagger
    volumes:
      - ./app/config/swagger/swagger.json:/swagger.json

Update of deployment.sh

!? This seems to be a dev environment specific script !?

At the bottom of the script add --remove-orphans to the first 'docker-compose down' command:

Code Blockdocker-compose down --remove-orphans && docker system prune -a -f && docker-compose pull && docker-compose up -d --remove-orphans

Note

TODO: add .env File && update docker-compose

Email Templates

Add a new file requestPasswordResetAdmin.html in the config/email-templates Folder. Forgot.html can be used as a base template, afterwards update the text in the email template.

Info

A default Template can be found in the config.zip in https://install.portrait.app/