Technical

How is Portrait rolled out?

Portrait is provided as a Docker container. The necessary dependencies are automatically downloaded, installed and activated using docker-compose.

How can I update Portrait app?

Either using a docker orchestration platform (e.g. Kubernetes) or using the docker-compose pull command.

Always consider the necessary steps after upgrading to a new major version.

What docker-compose commands will I need on a regular basis?

The docker-compose command works with information from the docker-compose.yaml file. This means it has to be executed from the directory where the file is located or its subfolders. Be especially careful if you have multiple instances of Portrait running on the same server.

In the following, we will list a bunch of commands which you will need regularly when administering Portrait.

Listing Container Processes

The docker-compose ps command lists the current containers. With this command, you can check if all the containers are running. It is also helpful if you want to execute a command for a certain container, to find out its name.

If you want to work with a specific container (e.g. for the backend), you only need to enter its base name, like this: docker-compose restart backend, ..

Stop or Start a Portrait instance

The command docker-compose start let's you start your portrait instance. docker-compose stop on the other side stops all container of this instance. Furthermore, you can also start and stop single containers.

To start the backend, for example, you can use this command:

docker-compose start backend

View Logs

With this command, you can view the Log Files either for all of Portrait's containers at once or for a specified one. We recommend to always look at the logs for a single container because you get an easier to understand output. Here is an example command:

docker-compose logs --tail="500" backend

The --tail option should always be preferred over just the plain logs. In the configuration from the example, the 500 means that the last 500 lines from the log file will be shown.

Without the tail option, docker will try to display the full log available. If your installation has been running for some time, the output takes a while to show the latest logs.

My host system ran out of space - what steps can I take?

Check the log file usage

You can either view them directly in the Portrait Config:

image-20240215-124239.png

Or via your SSH console.
You can also configure a custom logging configuration to only fewer days of logs.

Logging

Check for Docker disk usage

Use the docker system df command to view the used space:

docker system df

To view the used space from volumes:

docker system df -v

 

See the official docker docs for more details: docker system df

Clean up unused docker resources

You can use the prune command, which was mentioned above.

Docker Prune:

Warning This command can remove more data than just Portrait. Please proceed to the official docker documentation for detailed information.

Prune unused Docker objects

docker system prune

What additional analysis steps can I take?

https://dev.yorhel.nl/ncdu is a useful tool that generates a tree structure with the folder size

Delete all docker logs

Warning this will remove ALL docker logs from ALL containers EVER RUN on the ENTIRE system. Not just Portrait! Use with extreme caution

One problem could be extensive logging. The proper fix would be to figure out where and why extensive logs are created. One hacky workaround is to just delete everything.

Make sure to only use this as a last resort.

Enlarge Linux disk space

Another option would be to enlarge the disk of the virtual machine. Please keep in mind that when doing this, you also have to enlarge the volume in the VM.

I need to add a self-signed certificate, so that I can connect to ELO via HTTPS

We have a documentation about this procedure here.

 

What is the difference between docker-compose stop and down?

docker-compose stop will stop the containers, but not remove them.

docker-compose down will remove the containers and any network that was created by them.

It seems like I cannot connect to my local applications?

If you are using Docker container on the same machine as your existing sources (databases, business applications, …) and want to connect, then you cannot use 127.0.0.1 or localhost. Instead, you need to connect to host.docker.internal.