-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding nextcloud desktop linux dev env #244
base: master
Are you sure you want to change the base?
Conversation
Thanks, that seems like a neat idea :) I'll try to give that a spin the next few days. |
Hello, |
- '${SERVER_DATA_PATH:-data}:/var/www/html/data' | ||
- '${SERVER_CONFIG_PATH:-config}:/var/www/html/config' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to keep those as docker volumes which can get automatically cleaned up when recreating the environment. Can you elaborate on why this would be needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this functionality is preserved as the default one. If ones want to locally access the files under data or config (which is needed for some scenarios) she can edit the .env and modify the SERVER_DATA_PATH SERVER_CONFIG_PATH vars. This optional again for people knowing what thy want!
#SERVER_DATA_PATH=$BASE/workspace/server-data
#SERVER_CONFIG_PATH=$BASE/workspace/server-config
Some usage examples.
When needing to easily modify server config you need the server-config outside.
When needing to mangle with my use case of testing server side symlinks it was more convenient to also have the server's data dir outside.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When needing to easily modify server config you need the server-config outside.
(considering you are on latest master of this repo) https://juliushaertl.github.io/nextcloud-docker-dev/customizing/config/#nextcloud-configphp would cover that already
When needing to mangle with my use case of testing server side symlinks it was more convenient to also have the server's data dir outside.
I see, though I'd say this a quite special use case I'm undecided if that shall be generally a thing. Might then be unexpected that it only works for the main nextcloud container, not for others. Was there any reason to not just use a shell in the container using docker-compose exec nextcloud bash
?
ARG RUN_USER | ||
ARG RUN_UID | ||
ARG RUN_GROUP | ||
ARG RUN_GID | ||
|
||
RUN groupadd -o -g $RUN_GID $RUN_GROUP && \ | ||
useradd -m -s /bin/bash -o -u $RUN_UID -g $RUN_GID $RUN_USER && \ | ||
groupmod -o -g ${RUN_GID} www-data && \ | ||
usermod -o -u ${RUN_UID} -g www-data www-data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this needed for? If this is a general thing then it should go to the phpXX docker files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess for the mount of the data directory, right?=
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-81}:latest | ||
#image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-81}:latest | ||
image: nextcloud-${PHP_VERSION:-81}:local |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be changed. I just updated the docs a bit yesterday to explain how to build local changes to the images as https://juliushaertl.github.io/nextcloud-docker-dev/customizing/build/
@@ -83,17 +103,27 @@ for app in "${APPS_TO_INSTALL[@]}" | |||
do | |||
install_app "$app" | |||
done | |||
install_desktop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit hesitant to have this in by default. Maybe we can just have a proper documentation how to clone and setup?
docker-compose run database-mysql bash -c 'mysql -h database-mysql -u root -p${MYSQL_ROOT_PASSWORD}' | ||
``` | ||
|
||
## Nextcloud Desktop Development |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the docs over to a dedicated docs/
folder, can you also put this over there in a separate file?
## Database (mysql) access | ||
|
||
``` | ||
docker-compose run database-mysql bash -c 'mysql -h database-mysql -u root -p${MYSQL_ROOT_PASSWORD}' | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated change already in https://juliushaertl.github.io/nextcloud-docker-dev/services/database/
@@ -313,6 +328,9 @@ Xdebug is shipped but disabled by default. It can be turned on by running: | |||
``` | |||
docker compose exec nextcloud bash | |||
sudo -E -u www-data php -dxdebug.start_with_request=yes -dxdebug.client_host=host.docker.internal cron.php | |||
# or as a single line | |||
docker-compose exec nextcloud sudo -E -u www-data php -dxdebug.start_with_request=yes -dxdebug.client_host=host.docker.internal occ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should go to the docs folder at https://juliushaertl.github.io/nextcloud-docker-dev/tools/xdebug/
But this is an unrelated change so please split this to a separate pr ;)
This is adding a container to compile nextcloud desktop for linux.
Testing can be done in the container or in the host system.