Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Further settings can be configured directly in the UI. These settings are very specific and are either defined once while installing Portrait or are needed to define advanced behavior.

For the general UI configuration refer to: General settings

The settings are split into two parts:

Setup

This section defines the connection between the frontend and backend. After the initial setup was done, this should not be changed - unless the system was relocated to a new URL.

Name

NEXT_PUBLIC_PUBLIC_URL

https://portal.customer.xyz
This is the frontend URL your users are using to reach Portrait.

This is once setup at installation and only needs to be changed if your endpoint URL was renamed.

For example if you host Portrait under a different DNS name.

NEXT_PUBLIC_API_URL

https://portal.customer.xyz/api

This is the backend URL which is used by the frontend to connect to the backend.

This is once setup at installation and only needs to be changed if your endpoint URL was renamed.

For example if you host Portrait under a different DNS name.

NEXT_PUBLIC_INTERNAL_API_URL

http://backend:8080/api

This is the internal URL of the backend and shall not be changed.

You need to restart Portrait after you changed this values.

Advanced Customization

Name

NEXT_PUBLIC_PUBLIC_ACCESS

false / true
This flag decides if Portrait is run in Public Mode - without Login. This flag must be used in conjunction with the Flag “auth.publicAccess” inside the General settings .

Public-Mode must be licensed separately. Contact your Portrait Partner for details.

NEXT_PUBLIC_SUPPORTED_LANGS

de,en
Usually, Portrait auto-detects the browser language of the user. If you want to override this behavior, you can set this value.

The list is comma separated of the supported languages. If only one is needed, just use that without a comma.

NEXT_PUBLIC_DISALLOW_LOGIN

false / true

This feature flag defines if you want to hide the login button.

Only useful if you are running your App in public mode.

NEXT_PUBLIC_ALLOW_QUERY_LOGIN

false / true

Allow logging in with query parameters for demo uses. This is by default deactivated for security reasons.

You can use the credentials inside the URL:
https://portal.customer.xyz/de?action=login&user=user@customer.xyz&password=asdf

NEXT_PUBLIC_API_LOGGING

false / true

Don't add this value, unless instructed by the Support-Team.

You need to restart Portrait after you changed this values.

Example .env File

The advanced settings above are found in the file: app/config/ui/.env (.env files are usually hidden in the directory listing, open it directly with a text editor).

### Setup

# The URL under which the frontend will be reachable
NEXT_PUBLIC_PUBLIC_URL=https://dev.portraitapp.co

# The public API URL
NEXT_PUBLIC_API_URL=https://dev.portraitapp.co/api

# The API URL which the server should use
NEXT_PUBLIC_INTERNAL_API_URL=http://backend:8080/api

### Advanced Customization

# Whether API requests should be logged
NEXT_PUBLIC_API_LOGGING=false

# Allow public access, deactivates auth mechanism
NEXT_PUBLIC_PUBLIC_ACCESS=false

# Comma separated array of supported languages. If only one, just use that without comma
NEXT_PUBLIC_SUPPORTED_LANGS=de,en

# Disable login / registration functionality. Only works if PUBLIC_ACCESS is set to true
NEXT_PUBLIC_DISALLOW_LOGIN=false

# Allow logging in with query paramters for demo. You could login with a URL like
# /de?action=login&user=user@customer.xyz&password=asdf
NEXT_PUBLIC_ALLOW_QUERY_LOGIN=false
  • No labels