Skip to content

Latest commit

 

History

History
143 lines (95 loc) · 2.98 KB

File metadata and controls

143 lines (95 loc) · 2.98 KB

Advanced setup

Environment variables

The development environment can be customized through environment variables.

An .env file is optional. Variables can also be provided inline:

VERSION_NEXTCLOUD=stable33 docker compose up

By default, VERSION_NEXTCLOUD uses master. To use another Nextcloud version, set it to the corresponding branch from the Nextcloud server repository.

Xdebug can be configured with its native XDEBUG_MODE variable:

XDEBUG_MODE=debug docker compose up
XDEBUG_MODE=develop,debug docker compose up
XDEBUG_MODE=coverage docker compose up

Database

MySQL is used by default:

docker compose up

The supported DB_HOST values are:

  • mysql
  • pgsql

To use PostgreSQL:

DB_HOST=pgsql docker compose up

Optional services

Optional services are enabled with Docker Compose profiles:

docker compose --profile eurooffice up
docker compose --profile playwright up
docker compose --profile signal up
docker compose --profile whatsapp up

Multiple profiles can be enabled together:

docker compose \
	--profile eurooffice \
	--profile playwright \
	up

Multiple environments

Multiple checkouts can run at the same time.

Docker uses the standard host ports when they are available. If a port is already in use, another available port is selected automatically.

Start each environment from its own directory:

cd /path/to/first-checkout
docker compose up
cd /path/to/second-checkout
docker compose up

To see the ports assigned to an environment:

docker compose ps

To check a specific port, use:

docker compose port nginx 80

For example, if it returns:

127.0.0.1:81

access Nextcloud at:

http://localhost:81

When port 80 is available, Nextcloud remains accessible normally at:

http://localhost

A specific host port can still be requested explicitly:

HTTP_PORT=9000 HTTPS_PORT=9443 docker compose up

By default, published services bind to 127.0.0.1 and are accessible only from the local host. To expose them on other network interfaces, set:

IP_BIND=0.0.0.0 docker compose up

This can make the development services accessible to other hosts on the network, subject to the host firewall and network configuration.

HTTP and HTTPS use automatic ranges beginning at ports 80 and 443 when no override is provided. The example above forces host:9000 -> container:80 and host:9443 -> container:443.

PHP custom settings

Custom PHP settings can be added as .ini files in volumes/php/. This directory is ignored by Git and is mounted into the PHP container without replacing the default configuration bundled in the image.

For example, create volumes/php/99-local.ini:

memory_limit=1024M
upload_max_filesize=512M

Restart the PHP service after changing these files:

docker compose restart nextcloud

⬅️ Back to index