Install Portrait on Windows

This how to-article will guide you through the installation of Portrait on Windows.

Running Portrait on Windows is not meant for Production. There will be no official support!

Instructions

This how-to contains several steps:

  1. Install Docker Desktop

  2. Install Portrait

  3. Configure the most basic setup 

Install Docker Desktop

Go to https://www.docker.com/products/docker-desktop and Download the Docker Desktop Installer.

Execute the Installer, by default this will activate the Hyper-V feature on your Windows machine.

Attention VMware users

If you are using a VMware Workstation, activating the Hyper-V feature will lead to a non functioning VMware environment.

As a workaround, install Docker Desktop inside a VMware guest windows virtual machine and activate “Enable Hypervisor Applications” in the VM settings.

You must restart the machine after installing Docker Desktop.

Docker Desktop will run a virtual environment that is called “Docker Engine”. The engine is a Linux and uses by default 2 cores, 2 GB of memory and has a max. image size of 64GB.

The first startup of Docker Desktop will take longer, depending on your hardware.

Open the Docker Desktop Dashboard via the System-Tray.
If you see this screen, the Engine is up and running:

Install Portrait

First you need the basic configuration which sets up the container with docker-compose and contains the basic settings file. The files are available as a package and this guide will walk you through download, extraction and usage.

Prepare a folder on your computer where Portrait should be installed, for example: C:\container\portrait.

Execute this PowerShell command to download and extract the latest version:

iex ((New-Object System.Net.WebClient).DownloadString('https://install.portrait.app/setup.ps1'))

You now have a docker-compose.yml and a folder app inside your Portrait location:

  • C:\container\portrait\app

  • C:\container\portrait\docker-compose.yml

Initial Configuration

mkdir public

If you want to use demoData:

If you want to use Demo Data
mv app/config/application-prod-demoData.yml app/config/application-prod.yml

Replace the following Configs in application-prod.yml

%title => Title of your Portrait Installation

%owner => Owner of your Portrait Installation

%adminLogin => Admin Username MUST be an email address

%adminPassword => Admin Password

%baseUrl => Set the URL under which Portrait will be accessible for end users (default: http://localhost)

%secret => Set a random Secret, which will be used internally for the JWT Tokens (example: 1iGGXV6LLnSKPZWxUeZGShJwx5Z6r93p)

Replace the following Configs in app/config/frontend/.env

%baseUrl => Set the URL under which Portrait will be accessible for end users (default: http://localhost)

Configure .env

Add:

PROXY_PORT=<port> =>Port which will be exposed to the host (default: 80)

CODE_SERVER_PW=<pw> => Will be used for the VS Code Dev Server

Run docker-compose

Execute this command from inside the folder C:\Portrait\ or $HOME/portrait

docker-compose up -d

Access Portrait

Wait a while and go to http://localhost:80/ or test the access with: curl http://localhost:80.

Copyright Treskon GmbH.