Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.
/ nmcdockerdev Public archive

Minimal docker dev for app development [we have moved to devcontainers meanwhile]

Notifications You must be signed in to change notification settings

nextmcloud/nmcdockerdev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

NextMagentaCloud mini developer docker image

Building the image

docker build -t ncdev-1.2 .

Note: for RUST, on M1 Mac, the image MUST be build for Intel platform and uses Rosetta to run properly. The Dockerfile fixes the platform atm to --platform=linux/amd64 to run reliable on Apple Silicon and make tools like krankerl working.

Running the image

The files and directories requiring changes during development as mounted to local directories. Set NMC_DEV_ROOT environment variable to the place you want to have the artifacts in.

With plain docker the first time after build:

docker run --name=devnextcloud --platform=linux/amd64 -p 8080:80 -d \
-v $NMC_DEV_ROOT/nc_docker/apps:/var/www/html/custom_apps \
-v $NMC_DEV_ROOT/nc_docker/config:/var/www/html/config \
-v $NMC_DEV_ROOT/nc_docker/data:/var/www/html/data \
-v $NMC_DEV_ROOT/nc_docker/theme:/var/www/html/themes \
ncdev-1.2

Next time, you only have to run:

docker start devnextcloud

If you want to reuse name for a new container version, you have to call first:

docker stop devnextcloud
docker rm `docker ps -a --quiet --filter name=devnextcloud`

Then, go ahead as described in first time run before.

TODO: With docker-compose:

docker-compose -d up

On first start, after container is up, got to http://localhost:8080 and manually finish post install procedure (e.g. set admin, install basic apps).

Access by commandline and Nextcloud log filtering

By commandline:

docker exec -ti devnextcloud /bin/bash

The image contains composer, phpunit, php-cs-fixer and krankerl for direct use from commandline.

Filter Nextcloud log by app:

tail -f data/nextcloud.log |jq 'select(.app=="nmcprovisioning")'

Without deprecation warnings: |contains("TimedJob")

tail -f data/nextcloud.log |jq 'select(.app=="nmcprovisioning" and has("exception")) | select(.exception.Trace[].class|contains(["SlupCircuitHalfOpenJob", "SlupCircuitBootJob"]))'

Run occ command in container

docker exec --user www-data devnextcloud php occ ...

Example 1: enable cron as Backgroundjob executor:

docker exec --user www-data devnextcloud php occ background:cron

Example 2: Config settings for OpenId connect provider

docker exec --user www-data devnextcloud php occ user_oidc:provider Telekom --clientid="10TVL0SAM30***000004901NEXTMAGENTACLOUD0000***" --clientsecret="F***" --bearersecret="J***" --discoveryuri="https://accounts.demo/.well-known/openid-configuration" --unique-uid="0"

Enable short links

config.php:
  'htaccess.RewriteBase' => '/',

Then call:

docker exec --user www-data devnextcloud php occ maintenance:update:htaccess

About

Minimal docker dev for app development [we have moved to devcontainers meanwhile]

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published