Skip to content

Commit b104ea8

Browse files
authored
adjustments for changes in AppAPI in last two months (#26)
1. `deploy` command was deprecated in AppAPI `2.1.0` 2. for dev registration AppAPI now accepts values in `--json-info` with the same key names as in `info.xml`: * `appid` -> `id` * `system_app` -> `system` 3. `occ app_api:app:register` will take default deploy daemon if not specify, it is more easy for people than direct specify name Changes `1` and `2` are not mandotory till one-two months more, after that we plan to drop old values. --------- Signed-off-by: Alexander Piskun <[email protected]>
1 parent 8cfe155 commit b104ea8

File tree

3 files changed

+6
-16
lines changed

3 files changed

+6
-16
lines changed

Makefile

+4-12
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,28 @@ help:
99
@echo " Next commands are only for dev environment with nextcloud-docker-dev!"
1010
@echo " They should run from the host you are developing on (with activated venv) and not in the container with Nextcloud!"
1111
@echo " "
12-
@echo " deploy deploy example to registered 'docker_dev' for Nextcloud"
13-
@echo " "
14-
@echo " run install Context Chat for Nextcloud"
12+
@echo " run deploy and install Context Chat for Nextcloud"
1513
@echo " "
1614
@echo " For development of this example use PyCharm run configurations. Development is always set for last Nextcloud."
1715
@echo " First run 'Context Chat' and then 'make manual_register', after that you can use/debug/develop it and easy test."
1816
@echo " "
19-
@echo " register perform registration of running 'Context Chat' into the 'manual_install' deploy daemon."
17+
@echo " register perform registration of running 'Context Chat' into the 'manual_install' deploy daemon."
2018

2119
#.PHONY: build-push
2220
#build-push:
2321
# docker login ghcr.io
2422
# docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ghcr.io/nextcloud/context_chat_backend:2.0.1 --tag ghcr.io/nextcloud/context_chat_backend:latest .
2523

26-
.PHONY: deploy
27-
deploy:
28-
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister context_chat_backend --silent || true
29-
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:deploy context_chat_backend docker_dev \
30-
--info-xml https://raw.githubusercontent.com/nextcloud/context_chat_backend/master/appinfo/info.xml
31-
3224
.PHONY: run
3325
run:
3426
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister context_chat_backend --silent || true
35-
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register context_chat_backend docker_dev \
27+
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register context_chat_backend \
3628
--force-scopes \
3729
--info-xml https://raw.githubusercontent.com/nextcloud/context_chat_backend/master/appinfo/info.xml
3830

3931
.PHONY: register
4032
register:
4133
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister context_chat_backend --silent || true
4234
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register context_chat_backend manual_install --json-info \
43-
"{\"appid\":\"context_chat_backend\",\"name\":\"Context Chat Backend\",\"daemon_config_name\":\"manual_install\",\"version\":\"2.0.1\",\"secret\":\"12345\",\"port\":10034,\"scopes\":[],\"system_app\":0}" \
35+
"{\"id\":\"context_chat_backend\",\"name\":\"Context Chat Backend\",\"daemon_config_name\":\"manual_install\",\"version\":\"2.0.1\",\"secret\":\"12345\",\"port\":10034,\"scopes\":[],\"system\":0}" \
4436
--force-scopes --wait-finish

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
## Simple Install
99
1. Install three mandatory apps for this app to work as desired in your Nextcloud install from the "Apps" page:
10-
- AppAPI (>= v2.0.3): https://apps.nextcloud.com/apps/app_api
10+
- AppAPI (>= v2.2.0): https://apps.nextcloud.com/apps/app_api
1111
- Context Chat (>= 1.1.0): https://apps.nextcloud.com/apps/context_chat
1212
- Assistant: https://apps.nextcloud.com/apps/assistant (The OCS API or the `occ` commands can also be used to interact with this app but it recommended to do that through a Text Processing OCP API consumer like the Assitant app.)
1313
2. Install this backend app (Context Chat Backend: https://apps.nextcloud.com/apps/context_chat_backend) from the "External Apps" page

example.env

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,14 @@
1010
#TRANSFORMERS_OFFLINE=1
1111

1212
# AppAPI headers
13-
AA_VERSION=2.0.3
13+
AA_VERSION=2.2.0
1414
APP_SECRET=12345
1515
APP_ID=context_chat_backend
1616
APP_DISPLAY_NAME=Context Chat Backend
1717
APP_VERSION=2.0.1
18-
APP_PROTOCOL=http
1918
APP_HOST=0.0.0.0
2019
APP_PORT=10034
2120
APP_PERSISTENT_STORAGE=persistent_storage
22-
IS_SYSTEM_APP=0
2321
NEXTCLOUD_URL=http://nextcloud.local
2422

2523
# CUDA Support

0 commit comments

Comments
 (0)