-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(examples): update
to_gif
app (AppAPI 5.0.0) (#302)
Signed-off-by: Edward Ly <contact@edward.ly> Co-authored-by: Alexander Piskun <13381981+bigcat88@users.noreply.github.com>
- Loading branch information
Showing
4 changed files
with
66 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM python:3.11-bookworm | ||
FROM python:3-bookworm | ||
|
||
COPY requirements.txt / | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,82 @@ | ||
.DEFAULT_GOAL := help | ||
|
||
GITHUB_USERNAME := cloud-py-api | ||
|
||
APP_ID := to_gif | ||
APP_NAME := ToGif | ||
APP_VERSION := 1.0.0 | ||
APP_SECRET := 12345 | ||
APP_PORT := 9031 | ||
|
||
JSON_INFO := "{\"id\":\"$(APP_ID)\",\"name\":\"$(APP_NAME)\",\"daemon_config_name\":\"manual_install\",\"version\":\"$(APP_VERSION)\",\"secret\":\"$(APP_SECRET)\",\"port\":$(APP_PORT),\"routes\":[{\"url\":\".*\",\"verb\":\"GET, POST, PUT, DELETE\",\"access_level\":1,\"headers_to_exclude\":[]}]}" | ||
|
||
.PHONY: help | ||
help: | ||
@echo "Welcome to ToGif example. Please use \`make <target>\` where <target> is one of" | ||
@echo "Welcome to $(APP_NAME). Please use \`make <target>\` where <target> is one of" | ||
@echo " " | ||
@echo " Next commands are only for dev environment with nextcloud-docker-dev!" | ||
@echo " They should run from the host you are developing on(with activated venv) and not in the container with Nextcloud!" | ||
@echo " " | ||
@echo " build-push build image and upload to ghcr.io" | ||
@echo " " | ||
@echo " run28 install ToGif for Nextcloud 28" | ||
@echo " run install ToGif for Nextcloud Last" | ||
@echo " run28 install $(APP_NAME) for Nextcloud 28" | ||
@echo " run29 install $(APP_NAME) for Nextcloud 29" | ||
@echo " run30 install $(APP_NAME) for Nextcloud 30" | ||
@echo " run install $(APP_NAME) for Nextcloud Latest" | ||
@echo " " | ||
@echo " For development of this example use PyCharm run configurations. Development is always set for last Nextcloud." | ||
@echo " First run 'ToGif' and then 'make registerXX', after that you can use/debug/develop it and easy test." | ||
@echo " For development of this example use PyCharm run configurations. Development is always set to the latest version of Nextcloud." | ||
@echo " First run '$(APP_NAME)' and then 'make registerXX', after that you can use/debug/develop it and easy test." | ||
@echo " " | ||
@echo " register28 perform registration of running 'to_gif' into the 'manual_install' deploy daemon." | ||
@echo " register perform registration of running 'to_gif' into the 'manual_install' deploy daemon." | ||
@echo " register28 perform registration of running '$(APP_ID)' into the 'manual_install' deploy daemon." | ||
@echo " register29 perform registration of running '$(APP_ID)' into the 'manual_install' deploy daemon." | ||
@echo " register30 perform registration of running '$(APP_ID)' into the 'manual_install' deploy daemon." | ||
@echo " register perform registration of running '$(APP_ID)' into the 'manual_install' deploy daemon." | ||
|
||
.PHONY: build-push | ||
build-push: | ||
docker login ghcr.io | ||
docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ghcr.io/cloud-py-api/to_gif:latest . | ||
docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ghcr.io/$(GITHUB_USERNAME)/$(APP_ID):latest . | ||
|
||
.PHONY: run28 | ||
run28: | ||
docker exec master-stable28-1 sudo -u www-data php occ app_api:app:unregister to_gif --silent --force || true | ||
docker exec master-stable28-1 sudo -u www-data php occ app_api:app:register to_gif --force-scopes \ | ||
--info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/to_gif/appinfo/info.xml | ||
docker exec master-stable28-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true | ||
docker exec master-stable28-1 sudo -u www-data php occ app_api:app:register $(APP_ID) --force-scopes \ | ||
--info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/$(APP_ID)/appinfo/info.xml | ||
|
||
.PHONY: run29 | ||
run29: | ||
docker exec master-stable29-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true | ||
docker exec master-stable29-1 sudo -u www-data php occ app_api:app:register $(APP_ID) --force-scopes \ | ||
--info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/$(APP_ID)/appinfo/info.xml | ||
|
||
.PHONY: run30 | ||
run30: | ||
docker exec master-stable30-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true | ||
docker exec master-stable30-1 sudo -u www-data php occ app_api:app:register $(APP_ID) --force-scopes \ | ||
--info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/$(APP_ID)/appinfo/info.xml | ||
|
||
.PHONY: run | ||
run: | ||
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister to_gif --silent --force || true | ||
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register to_gif --force-scopes \ | ||
--info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/to_gif/appinfo/info.xml | ||
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true | ||
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register $(APP_ID) --force-scopes \ | ||
--info-xml https://raw.githubusercontent.com/cloud-py-api/nc_py_api/main/examples/as_app/$(APP_ID)/appinfo/info.xml | ||
|
||
.PHONY: register28 | ||
register28: | ||
docker exec master-stable28-1 sudo -u www-data php occ app_api:app:unregister to_gif --silent --force || true | ||
docker exec master-stable28-1 sudo -u www-data php occ app_api:app:register to_gif manual_install --json-info \ | ||
"{\"id\":\"to_gif\",\"name\":\"to_gif\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9031,\"scopes\":[\"FILES\", \"NOTIFICATIONS\"]}" \ | ||
--force-scopes --wait-finish | ||
docker exec master-stable28-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true | ||
docker exec master-stable28-1 sudo -u www-data php occ app_api:app:register $(APP_ID) manual_install --json-info $(JSON_INFO) --force-scopes --wait-finish | ||
|
||
.PHONY: register29 | ||
register29: | ||
docker exec master-stable29-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true | ||
docker exec master-stable29-1 sudo -u www-data php occ app_api:app:register $(APP_ID) manual_install --json-info $(JSON_INFO) --force-scopes --wait-finish | ||
|
||
.PHONY: register30 | ||
register30: | ||
docker exec master-stable30-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true | ||
docker exec master-stable30-1 sudo -u www-data php occ app_api:app:register $(APP_ID) manual_install --json-info $(JSON_INFO) --force-scopes --wait-finish | ||
|
||
.PHONY: register | ||
register: | ||
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister to_gif --silent --force || true | ||
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register to_gif manual_install --json-info \ | ||
"{\"id\":\"to_gif\",\"name\":\"to_gif\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9031,\"scopes\":[\"FILES\", \"NOTIFICATIONS\"]}" \ | ||
--force-scopes --wait-finish | ||
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister $(APP_ID) --silent --force || true | ||
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register $(APP_ID) manual_install --json-info $(JSON_INFO) --force-scopes --wait-finish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters