1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 17:14:08 +02:00
No description
  • Rust 89.9%
  • Nix 5.8%
  • PHP 2.2%
  • Nushell 2%
Find a file
2021-12-15 17:16:07 +01:00
.github/workflows 1.0.0 2021-10-12 16:32:17 +02:00
images build 8.1 image 2021-12-15 17:16:07 +01:00
src enable running kaspersky tests 2021-12-14 15:27:48 +01:00
.gitignore init repo 2021-03-11 21:15:24 +01:00
Cargo.lock 1.0.0 2021-10-12 16:32:17 +02:00
Cargo.toml 1.0.0 2021-10-12 16:32:17 +02:00
LICENSE 1.0.0 2021-10-12 16:32:17 +02:00
README.md add kaspersky service 2021-11-08 17:42:41 +01:00

Haze

Hazy with a chance of clouds.

Easy setup and management of Nextcloud test instances using docker

What

haze provides an easy way to setup Nextcloud test instances with a choice of php version, database server, optional s3 or ldap setup and more.

Setup

Requirements

  • Docker

Config

Create a file ~/.config/haze/haze.toml with the following options:

sources_root = "/path/to/nextcloud/sources"

See the configuration section for more options.

Managing instances

Start an instance

haze start [database] [php-version]

Where database is one of sqlite, mysql, mariadb or pgsql with an optional version (e.g. pgsql:12), defaults to sqlite. And php-version is one of 7.2, 7.3, 7.4, 8.0, 7 or 8, defaults to 8.0

Additionally, you can use the following options when starting an instance:

  • s3: setup an S3 server and configure to Nextcloud to use it as primary storage
  • <path to app.tar.gz>: by specifying the path to an app package this package will be extracted into the apps directory of the new instance (overwriting any existing app code). This can be used to quickly test a packaged app.
  • ldap: setup an LDAP server
  • onlyoffice setup an onlyoffice document server
  • push setup client push
  • smb: setup a samba server for external storage use
  • kaspersky: setup a kaspersky scan engine server. (Requires manually setting up the image)

Run tests in a new instance

haze test [database] [php-version] [path]

Where path is a file or folder to run phpunit in, relative to the sources root.

List running instances

haze

or

haze list

Remove all running instances

haze clean

Controlling running instances

The following commands run against the most recently started instance and allow optionally providing a match to select a specific instance by it's name.

Open an instance

haze [match] open

Open the database of an instance

haze [match] db

Execute a command on an instance

haze [match] exec [cmd]

If no cmd is specified it will launch bash

Execute an occ command on an instance

haze [match] occ [cmd]

Connect to the database on an instance

haze [match] db

Show the logs of an instance

haze [match] logs

Stop an instance

haze [match] stop

Configuration

Configuration is loaded from ~/.config/haze/haze.toml and has the following options

sources_root = "/path/to/sources" # path of the nextcloud sources. required
work_dir = "/path/to/temp/dir" # path to temporary directory. optional, defaults to "/tmp/haze"

[auto_setup] # optional
enabled = false # whether or not to automatically install nextcloud on `haze start`. optional, defaults to false
username = "foo" # username for admin user during auto setup. optional, defaults to "admin"
password = "bar" # password for admin user during auto setup. optional, defaults to "admin"

[[volume]]
source = "/tmp/haze-shared"
target = "/shared"
create = true

[[volume]]
source = "/home/me/Downloads"
target = "/Downloads"
read_only = true