- Notifications
You must be signed in to change notification settings - Fork86
Nextcloud development environment using docker-compose
License
juliusknorr/nextcloud-docker-dev
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Documentation |Nextcloud Developer Portal
Nextcloud's development environment using Docker Compose providing a large variety of services for Nextcloud server and app development and testing.
⚠DO NOT USE THIS IN PRODUCTION Various settings in this setup are considered insecure and default passwords and secrets are used all over the place
- ☁ Nextcloud containers for running multiple versions
- 🐘 Multiple PHP versions
- 🔒 Nginx proxy with optional SSL termination
- 🛢️ MySQL/PostgreSQL/MariaDB/SQLite/MaxScale, Redis cache
- 💾 Local or S3 primary storage
- 👥 LDAP with example user data, Keycloak
- ✉ Mailhog for testing mail sending
- 🚀 Blackfire, Xdebug for profiling and debugging
- 📄 Lots of integrating service containers: Collabora Online, Onlyoffice, Elasticsearch, ...
You can find a step-by-step tutorial on how to use this setup in theNextcloud Developer Portal. It will guide you through the setup and show you how to use it for app development:https://cloud.nextcloud.com/s/iyNGp8ryWxc7Efa?path=%2F1%20Setting%20up%20a%20development%20environment
In detail explanation of the setup and its features and configuration options can be found in thenextcloud-docker-dev documentation.
Tip
This is the recommended way to run the setup for development. You will have a local clone of all required source code.
To start the setup run the following commands to clone the repository and bootstrap the setup. This will prepare your setup and clone the Nextcloud server repository and required apps into theworkspace
folder.
git clone https://github.com/juliusknorr/nextcloud-docker-devcd nextcloud-docker-dev./bootstrap.sh
Depending on your docker version you will need to usedocker-compose
instead ofdocker compose
in the following commands.
This may take some time depending on your internet connection speed.
Once done you can start the Nextcloud container using:
docker compose up nextcloud
You can also start it in the background usingdocker compose up -d nextcloud
.
You can then access your Nextcloud instance athttp://nextcloud.local. The default username isadmin
and the password isadmin
.Other users can be found in the documentation.
[!WARN]Note that for performance reasons the server repository might have been cloned with
--depth=1
by default. To get the full history it is highly recommended to run:cd workspace/servergit fetch --unshallowgit config remote.origin.fetch"+refs/heads/*:refs/remotes/origin/*"git fetch origin
Tip
This is a very simple way but doesn't cover all features. If you are looking for a fully featured setup you may skip to the next section
There is a standalone version of the Nextcloud containers available that can be used to run Nextcloud without the other services. This is useful if you are just wanting to get started with app development against a specific server version, or to just have a quick way to develop, test or debug.
These containers support automatic fetching of the server source code and use SQLite as the database. The server source code is fetched from the official Nextcloud server repository and the version can be specified using theNEXTCLOUD_VERSION
environment variable. The default version ismaster
.
Running the containers does not need this repository to be cloned.
Example for running a Nextcloud server from the master branch of server:
docker run --rm -p 8080:80 ghcr.io/juliusknorr/nextcloud-dev-php81:latest
For app development you can mount your app directly into the container:
docker run --rm -p 8080:80 -v~/path/to/appid:/var/www/html/apps-extra/appid ghcr.io/juliusknorr/nextcloud-dev-php81:latest
TheSERVER_BRANCH
environment variable can be used to run different versions of Nextcloud by specifying either a server branch or git tag.
docker run --rm -p 8080:80 -e SERVER_BRANCH=v24.0.1 ghcr.io/juliusknorr/nextcloud-dev-php81:latest
You can also mount your local server source code into the container to run a local version of Nextcloud:
docker run --rm -p 8080:80 -e SERVER_BRANCH=v24.0.1 -v /tmp/server:/var/www/html ghcr.io/juliusknorr/nextcloud-dev-php81:latest
You can find documentation for more advanced features innextcloud-docker-dev documentation for example:
- Running stable Nextcloud versions in parallel
- Using different database backends
- Using HTTPS
About
Nextcloud development environment using docker-compose
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.