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

application.yml settings

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 resetting 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 need 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.

Can be skipped for production environments, default value is ‘prod’.
For development and demo instances, it can be set to ‘dev’ 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 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;
    }
    
    location /api-docs/ {
      proxy_pass http://backend: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/;
      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.yml

Switch to default docker-compose (recommended)

Info

Since 6.X we recommend to switch to a managed docker-compose.yml and only make changes in the .env file

  • Download the newest Installer from https://install.portrait.app/

  • Back up your old docker-compose.yml!

  • Copy the Contents of docker-compose.yml to your config

Note

Make sure use the old volume name for the index! Otherwise you will lose your data!

  • compare the old and new docker-compose for possible mismatches

  • copy the .env file from the Zip into the same directory as the docker-compose.yml

  • Configure the .env file for your specific installation
    Example:

    Code Block
    BACKEND_TAG=stable-6.0.0
    FRONTEND_TAG=stable-6.0.0
    PROXY_PORT=80
    CODE_SERVER_PW=secretPassword
  • Run the following command

    Code Block
    docker-compose down --remove-orphans && docker-compose up -d --remove-orphans

Manual change

Note

This

Manuel changes should only be used if there is a custom managed environment in use that applies additional configuration. For example with additional containers.

Swagger

-UI

Swagger-UI is not now 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

Depends_on and Startup commands:

The depends_on on for the different services have changed. new Config

New configuration is:

Code Block
languageyaml
frontend:
    command: sh -c "chmod 777 /app/wait-for.sh && /app/wait-for.sh -t 40 backend:8080/v3/api-docs -- npm run start"
    depends_on:
      - backend
backend:
    command: sh -c "chmod 777 config/wait-for.sh &&  ./config/wait-for.sh -t 25 index:9200 -- java -jar portrait-app.jar --spring.profiles.active=prod && tail -F anything"
    depends_on:
      - index
  proxy:
    command: sh -c "chmod 777 /app/wait-for.sh && /app/wait-for.sh -t 40 frontend:8081 -- nginx -g 'daemon off;'"
    depends_on:
      - backend
      - frontend

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/