Via Docker Compose

circle-info

This guide assumes you already have Docker arrow-up-rightinstalled.

circle-info

This Docker compose creates two services:

  1. Webserver (Apache/PHP) - The UXWizz Webserver imagearrow-up-right

  2. Database (MySQL) - MariaDB Imagearrow-up-right

Running UXWizz via docker compose

Copy this compose.yml file locally in a folder named uxwizz and run docker compose up -d

compose.yml
services:
  webserver:
    image: uxwizz/uxwizz-webserver:latest
    container_name: "uxwizz-webserver"
    restart: always
    ports:
      - "8000:80"
      - "4430:443"
    volumes:
      - html:/var/www/html
      - php-config:/usr/local/etc/php/php.ini
      - apache_sites_enabled:/etc/apache2/sites-enabled
      - apache_logs:/var/log/apache2
    environment:
      UXWIZZ_DB_HOST: db
      MYSQL_DATABASE: uxwizz
      MYSQL_ROOT_PASSWORD: temp-root-password-jasdlkz1
    depends_on:
      db:
        condition: service_healthy
  db:
    image: mariadb:11.7.2
    container_name: "uxwizz-db"
    ports:
      - "3306:3306"
    command: --max-allowed-packet=64MB --bind-address=0.0.0.0
    environment:
      MYSQL_ROOT_PASSWORD: temp-root-password-jasdlkz1
      MYSQL_DATABASE: uxwizz
      MARIADB_AUTO_UPGRADE: 1
      MARIADB_INITDB_SKIP_TZINFO: 1
    volumes:
      - mysql_data:/var/lib/mysql
    healthcheck:
      test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
      start_period: 10s
      interval: 10s
      timeout: 5s
      retries: 3
    restart: always
volumes:
  mysql_data:
  html:
  apache_logs:
  apache_sites_enabled:
  php-config:
circle-exclamation

To stop the services, you can run docker compose down.

To also delete all UXWizz data/db/volumes, you can run docker compose down -v.

Accessing UXWizz

As shown in the compose file, the ports exported are 8000 (HTTP) and 4430 (HTTPS). You should now be able to access your dashboard at http://localhost:8000arrow-up-right

Tip: Using Bind Volumes

If you want to use local folders as bind volumes, instead of named volumes.

You must first populate the html folder from the webserver image, by running this command:

Then, in compose.yml prepend ./ to all volumes, like this:

Last updated