Nextcloud Maps local development environment
Develop Nextcloud Maps locally using Docker, with a custom git-based snapshot system for easily saving and restoring the complete state of the local Nextcloud server instance.
The MySQL database and Nextcloud server web root are stored as Docker bind mounts to local directories (see
Modifications to these Nextcloud files while developing code take immediate effect for an efficient development workflow.
Snapshots are stored in a local git repo at
/var/local/snapshots/maps. To take a snapshot, execute
maps_snapshot_create 'Your commit message'
To restore a snapshot, execute
- Create a directory named
mapsin your home folder (i.e.
- Copy the files below into this folder (unless they are already present from a
git cloneof this repo).
- Create the directories
- Run the
maps/init.shscript to construct the Nextcloud instance and install the Maps app.
- Visit http://localhost:8000 in a web browser to log in to the fresh server. The default username is
The files below should reside in
~/maps. The code below assumes the containers are automatically named
maps_db_1, which should be the case if
docker-compose up -d is executed from a working directory called
maps using the
docker-compose.yml file included.
Use the official Nextcloud Docker image for a specific version. Installs additional dependencies needed to run the
make command for the Maps app installation.
Define the two containers and the bind mounts for the dynamic, persistent data storage. Specify the Apache listening port
Copy the persistent storage "volumes" to the snapshot git repo and commit the changes.
Restore the specified snapshot (by git commit hash) to the Docker bind mount directories, overwriting any existing files.
Script to automate the creation of the Docker containers and to provision the new Nextcloud server with the latest Nextcloud Maps app (