- Go down the containers
- Remove the folder volumes
- Go up the containers
This will delete the database and Nextcloud volumes. Before do a backup of all that you don't want to lost, by example volumes/nextcloud/config/config.php
-
cd volumes/nextcloud git pull origin master
- To work with PHP, I recommend to open your IDE in folder
volumes/nextcloud - To work only with frontend, you can directly open the folder of app that you are working but I recommend to open the folder
volumes/nextcloudto be possible look the code of other apps or server.
- Create a .env file at root folder with this content:
XDEBUG_CONFIG=client_host=172.17.0.1 client_port=9003 start_with_request=yes
- Open the IDE on folder
volumes/nextcloud - setup the extension PHP Debug or PHP Extension Pack
- Press
F5to start debugging or go to "Run > Start debugging" - Create a
launch.jsonfile to PHP - Add the follow to your
launch.jsoninside configuration named asListen for Xdebug:"pathMappings": { "/var/www/html": "${workspaceFolder}" }
- PS:
log_levelis defined to 0 (Criticals). If you wish a different value, ghante this at.envfile.
- The default user id (
UID) and group id (GID) of root user inside container is the same of your user in host machine. This is defined in.envfile. If is different of 1000 and 1000, change in your.envfile. - Run the follow command to move all files to your UID and GID:
sudo chown -R $USER:$USER volumes/nextcloud