A simple setup which consists of a Nextcloud and MariaDB containers. This is targeting macOS with Docker Desktop installed.
I frequently need a fresh and local Nextcloud deployment for:
- Reproducing reported problems around Nextcloud or its client apps in scope of customer support
- Trying out Nextcloud features
- Running automated client app tests with clean servers, in example Xcode UI tests
- A script for convenient control.
- Nextcloud exposed to host port 8080.
- MariaDB exposed to host port 8306.
- Passwords are
password
by default. See compose.yml for further details.
The included Zsh script simplifies handling a lot.
It takes at least one argument to know what to do.
To improve convenience even further, adding the bin
directory to your PATH
makes the script available independent from your current working directory.
export PATH='$PATH:~/path/to/this/bin'
You can start the Testcloud with this. If it does not exist yet, it will be set up automatically.
$ testcloud start
If you would like to define a specific Docker image tag for the Nextcloud image to use, you can do so through an environment variable.
$ NEXTCLOUD_TAG=30.0.5 testcloud start
If you need to do so, you can open a shell directly as www-data
in the Nextcloud web root inside the Docker container by issuing this:
$ testcloud shell
This is frequently necessary to interact with Nextcloud's command-line occ
.
To shut everything down while still keeping the containers around:
$ testcloud stop
To delete the containers completely without confirmation regardless of them running or not:
$ testcloud remove