Skip to content
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

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

basos9
Copy link
Contributor

@basos9 basos9 commented Nov 7, 2023

This is adding a container to compile nextcloud desktop for linux.
Testing can be done in the container or in the host system.

@basos9 basos9 changed the title Adding nextcloud desktop linux dev environemtn Adding nextcloud desktop linux dev env Nov 7, 2023
@juliusknorr
Copy link
Owner

Thanks, that seems like a neat idea :) I'll try to give that a spin the next few days.

@juliusknorr juliusknorr self-requested a review November 7, 2023 14:32
@basos9
Copy link
Contributor Author

basos9 commented Nov 7, 2023

Hello,
For the referece, the motivation for this is tol be used for testing nextcloud/desktop#250
which involves possible changes in both server and client.

Comment on lines +96 to +97
- '${SERVER_DATA_PATH:-data}:/var/www/html/data'
- '${SERVER_CONFIG_PATH:-config}:/var/www/html/config'
Copy link
Owner

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?

Copy link
Contributor Author

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.

Copy link
Owner

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 ?

Comment on lines +5 to +13
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
Copy link
Owner

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

Copy link
Owner

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?=

Comment on lines -68 to +69
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
Copy link
Owner

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
Copy link
Owner

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
Copy link
Owner

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?

Comment on lines +546 to +550
## Database (mysql) access

```
docker-compose run database-mysql bash -c 'mysql -h database-mysql -u root -p${MYSQL_ROOT_PASSWORD}'
```
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -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
Copy link
Owner

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 ;)

@juliusknorr juliusknorr marked this pull request as draft December 15, 2023 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants