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

docker-socket-proxy: move installation of app_api to containers.json … #5062

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions Containers/nextcloud/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -815,22 +815,5 @@ else
fi
fi

# Docker socket proxy
if version_greater "$installed_version" "27.1.2.0"; then
if [ "$DOCKER_SOCKET_PROXY_ENABLED" = 'yes' ]; then
if ! [ -d "/var/www/html/custom_apps/app_api" ]; then
php /var/www/html/occ app:install app_api
elif [ "$(php /var/www/html/occ config:app:get app_api enabled)" != "yes" ]; then
php /var/www/html/occ app:enable app_api
elif [ "$SKIP_UPDATE" != 1 ]; then
php /var/www/html/occ app:update app_api
fi
else
if [ "$REMOVE_DISABLED_APPS" = yes ] && [ -d "/var/www/html/custom_apps/app_api" ]; then
php /var/www/html/occ app:remove app_api
Comment on lines -826 to -830
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this is a problem, but the update and delete functionality is not offered by nextcloud_exec_commands.

Copy link
Collaborator

Choose a reason for hiding this comment

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

With the addition of this option, it would be possible to manage the required applications more precisely.
containers-schema.json

"nextcloud_applications": {
  "type": "array",
  "items": {
    "type": "string",
    "pattern": "^\\w+$"
  }
},

If you think it might be good, I can add installation and activation with this option.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

... and delete functionality is not offered by nextcloud_exec_commands.

ah good point. that is why I didnt use it for that in the past. Thanks for reminding me :)

If you think it might be good, I can add installation and activation with this option.

I think this is a big overengineered for now but thanks for the idea :)

fi
fi
fi

# Remove the update skip file always
rm -f "$NEXTCLOUD_DATA_DIR"/skip.update
5 changes: 5 additions & 0 deletions php/containers.json
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,11 @@
],
"cap_drop": [
"NET_RAW"
],
"nextcloud_exec_commands": [
"echo 'Activating App API...'",
"php /var/www/html/occ app:install app_api",
"php /var/www/html/occ app:enable app_api"
]
}
]
Expand Down