Skip to content

Getting started

We provide a docker-compose.yml file that starts Userli, Dovecot and MariaDB to set up a development environment.

Requirements

  • docker-compose or podman-compose
  • yarn (or yarnpkg on Ubuntu or Debian based systems)
  • composer

Info

If you don't have podman or docker installed, you can find the installation instructions on the podman website or the docker website.

Set up

Start the containers:

podman compose up -d
docker compose up -d

Info

This command will initiate building the containers on first run. Append --build to always force a full rebuild

Install PHP dependencies, run composer scripts and update assets:

composer install --ignore-platform-reqs
yarn
yarn encore dev

Initialize the database and install sample data:

podman compose exec userli bin/console doctrine:schema:create
podman compose exec userli bin/console doctrine:fixtures:load
docker compose exec userli bin/console doctrine:schema:create
docker compose exec userli bin/console doctrine:fixtures:load

Info

The doctrine:fixtures:load command will create four new accounts with corresponding roles (admin, user, support, suspicious) as well as some random aliases and vouchers. The domain for all accounts is "example.org" and the password is "password".

If you want to see more details about how the users are created, see src/DataFixtures.

Open your browser and go to http://localhost:8000

Troubleshooting

On systems with SELinux enabled, the webserver might throw an error due to broken filesystem permissions. To fix this, create docker-compose.override.yml in the root directory with following content:

---
services:
  userli:
    security_opt:
      - label=disable

  dovecot:
    security_opt:
      - label=disable