Initial QSfera import
This commit is contained in:
@@ -0,0 +1,165 @@
|
||||
.ONESHELL:
|
||||
SHELL := bash
|
||||
|
||||
# define standard colors
|
||||
BLACK := $(shell tput -Txterm setaf 0)
|
||||
RED := $(shell tput -Txterm setaf 1)
|
||||
GREEN := $(shell tput -Txterm setaf 2)
|
||||
YELLOW := $(shell tput -Txterm setaf 3)
|
||||
BLUE := $(shell tput -Txterm setaf 4)
|
||||
PURPLE := $(shell tput -Txterm setaf 5)
|
||||
CYAN := $(shell tput -Txterm setaf 6)
|
||||
WHITE := $(shell tput -Txterm setaf 7)
|
||||
|
||||
RESET := $(shell tput -Txterm sgr0)
|
||||
|
||||
COMPOSE_FILE := src/qsfera-base.yml
|
||||
|
||||
# run tests with ocwrapper by default
|
||||
WITH_WRAPPER ?= true
|
||||
OC_WRAPPER := ../../ocwrapper/bin/ocwrapper
|
||||
|
||||
# enable tika for full text extraction
|
||||
ifeq ($(START_TIKA),true)
|
||||
COMPOSE_FILE := src/tika.yml:$(COMPOSE_FILE)
|
||||
export SEARCH_EXTRACTOR_TYPE := tika
|
||||
else
|
||||
export SEARCH_EXTRACTOR_TYPE := basic
|
||||
endif
|
||||
|
||||
# enable email server
|
||||
ifeq ($(START_EMAIL),true)
|
||||
COMPOSE_FILE := src/email.yml:$(COMPOSE_FILE)
|
||||
export OC_ADD_RUN_SERVICES := notifications
|
||||
endif
|
||||
|
||||
# enable antivirus
|
||||
ifeq ($(START_ANTIVIRUS),true)
|
||||
COMPOSE_FILE := src/antivirus.yml:$(COMPOSE_FILE)
|
||||
export OC_ADD_RUN_SERVICES := $(OC_ADD_RUN_SERVICES) antivirus
|
||||
export POSTPROCESSING_STEPS := virusscan
|
||||
endif
|
||||
|
||||
# enable wopi services
|
||||
ifeq ($(ENABLE_WOPI),true)
|
||||
COMPOSE_FILE := $(COMPOSE_FILE):src/wopi.yml
|
||||
endif
|
||||
|
||||
# default to posix
|
||||
STORAGE_DRIVER ?= posix
|
||||
ifeq ($(STORAGE_DRIVER),posix)
|
||||
# posix requires a additional driver config
|
||||
COMPOSE_FILE := $(COMPOSE_FILE):src/posix.yml
|
||||
else ifeq ($(STORAGE_DRIVER),decomposeds3)
|
||||
COMPOSE_FILE := src/ceph.yml:$(COMPOSE_FILE)
|
||||
endif
|
||||
|
||||
# use latest as default tag if OC_IMAGE is provided but no tag is set
|
||||
ifneq ($(strip $(OC_IMAGE)),)
|
||||
ifeq ($(strip $(OC_IMAGE_TAG)),)
|
||||
OC_IMAGE_TAG := latest
|
||||
endif
|
||||
endif
|
||||
|
||||
COMPOSE_PROJECT_NAME := qsfera-acceptance-tests
|
||||
|
||||
# Export variables for sub-make calls
|
||||
export COMPOSE_PROJECT_NAME
|
||||
export COMPOSE_FILE
|
||||
|
||||
export OC_IMAGE
|
||||
export OC_IMAGE_TAG
|
||||
|
||||
# test configurations
|
||||
export STORAGE_DRIVER
|
||||
export WITH_WRAPPER
|
||||
export BEHAT_SUITE
|
||||
export BEHAT_FEATURE
|
||||
export TEST_SERVER_URL
|
||||
export USE_BEARER_TOKEN
|
||||
|
||||
## make definition
|
||||
.PHONY: help
|
||||
help:
|
||||
@echo -e "Test suites: ${CYAN}https://github.com/qsfera/server/tree/main/tests/acceptance/features${RESET}"
|
||||
@echo -e "Testing docs: ${CYAN}https://github.com/qsfera/server/tree/main/tests/README.md${RESET}"
|
||||
@echo
|
||||
@echo "Available commands (targets):"
|
||||
@echo -e " ${GREEN}run-api-tests\t\t${RESET}Build dev image, start services and run the tests."
|
||||
@echo -e " ${GREEN}start-services\t${RESET}Start service containers."
|
||||
@echo -e " ${GREEN}run-test-only\t\t${RESET}Run the tests only."
|
||||
@echo -e " ${GREEN}show-test-logs\t${RESET}Show the test logs."
|
||||
@echo -e " ${GREEN}ps\t\t\t${RESET}Show the running containers."
|
||||
@echo
|
||||
@echo -e " ${YELLOW}clean-dev-image\t${RESET}Delete the docker image built during acceptance tests."
|
||||
@echo -e " ${YELLOW}clean-containers\t${RESET}Delete the docker containers and volumes."
|
||||
@echo -e " ${YELLOW}clean-tests\t\t${RESET}Delete test dependencies and results."
|
||||
@echo -e " ${YELLOW}clean-all\t\t${RESET}Clean all resources: images, containers, volumes, test files."
|
||||
@echo
|
||||
@echo "Available environment variables:"
|
||||
@echo -e " ${PURPLE}OC_IMAGE\t\t${RESET}${CYAN}[image_repo]${RESET} КуСфера image to use. If provided, the dev image build is skipped."
|
||||
@echo -e " ${PURPLE}OC_IMAGE_TAG\t\t${RESET}${CYAN}[image_tag]${RESET} КуСфера image tag to use. If provided, the dev image build is skipped."
|
||||
@echo -e " ${PURPLE}WITH_WRAPPER\t\t${RESET}${CYAN}[true|false]${RESET} Start КуСфера server using ocwrapper. Default: ${YELLOW}true${RESET}"
|
||||
@echo -e " ${PURPLE}STORAGE_DRIVER\t${RESET}${CYAN}[posix|decomposed|decomposeds3]${RESET} Storage driver to use. Default: ${YELLOW}posix${RESET}"
|
||||
@echo -e " ${PURPLE}BEHAT_FEATURE\t\t${RESET}${RESET}${CYAN}[path]${RESET} Path to a feature file. Example: ${YELLOW}tests/acceptance/features/apiGraph/changeRole.feature${RESET}"
|
||||
@echo -e " ${PURPLE}BEHAT_SUITE\t\t${RESET}${RESET}${CYAN}[suite_name]${RESET} Test suite to run. Example: ${YELLOW}apiGraph${RESET}"
|
||||
@echo -e " ${PURPLE}TEST_SERVER_URL\t${RESET}${CYAN}[url]${RESET} URL of the КуСфера server to test against."
|
||||
@echo -e " ${PURPLE}USE_BEARER_TOKEN\t${RESET}${CYAN}[true|false]${RESET} Use a bearer token for authentication. Default: ${YELLOW}false${RESET}"
|
||||
@echo
|
||||
@echo -e "Example usage:"
|
||||
@echo -e " ${PURPLE}WITH_WRAPPER${RESET}=${YELLOW}false${RESET} \\"
|
||||
@echo -e " ${PURPLE}STORAGE_DRIVER${RESET}=${YELLOW}posix${RESET} \\"
|
||||
@echo -e " ${PURPLE}BEHAT_FEATURE${RESET}=${YELLOW}tests/acceptance/features/apiGraph/changeRole.feature${RESET} \\"
|
||||
@echo -e " make ${GREEN}run-api-tests${RESET}"
|
||||
|
||||
.PHONY: run-api-tests
|
||||
run-api-tests: $(OC_WRAPPER) build-dev-image clean-containers
|
||||
@echo "${BLUE}[INFO]${RESET} Compose project: ${YELLOW}$(COMPOSE_PROJECT_NAME)${RESET}"
|
||||
@echo "${BLUE}[INFO]${RESET} Compose file: ${YELLOW}$(COMPOSE_FILE)${RESET}"
|
||||
@echo "${BLUE}[INFO]${RESET} Using storage driver: ${YELLOW}$(STORAGE_DRIVER)${RESET}"
|
||||
# force use local server when using this command
|
||||
export TEST_SERVER_URL=https://qsfera-server:9200
|
||||
$(MAKE) --no-print-directory start-services
|
||||
$(MAKE) --no-print-directory run-test-only
|
||||
|
||||
.PHONY: start-services
|
||||
start-services: $(OC_WRAPPER) ## start services
|
||||
docker compose up -d --build --force-recreate
|
||||
|
||||
.PHONY: run-test-only
|
||||
run-test-only:
|
||||
docker compose -f src/acceptance.yml up
|
||||
|
||||
.PHONY: show-test-logs
|
||||
show-test-logs: ## show test logs
|
||||
docker compose logs --no-log-prefix -f acceptance-tests | less
|
||||
|
||||
.PHONY: ps
|
||||
ps: ## show running containers
|
||||
docker compose ps
|
||||
|
||||
$(OC_WRAPPER):
|
||||
@if [ "$(WITH_WRAPPER)" == "true" ]; then \
|
||||
$(MAKE) --no-print-directory -C ../../ocwrapper build \
|
||||
; fi;
|
||||
|
||||
.PHONY: build-dev-image
|
||||
build-dev-image:
|
||||
@if [ -z "$(OC_IMAGE)" ] && [ -z "$(OC_IMAGE_TAG)" ]; then \
|
||||
$(MAKE) --no-print-directory -C ../../../qsfera dev-docker \
|
||||
; fi;
|
||||
|
||||
.PHONY: clean-dev-image
|
||||
clean-dev-image: ## clean docker image built during acceptance tests
|
||||
@docker image rm qsfera/qsfera:dev || true
|
||||
|
||||
.PHONY: clean-containers
|
||||
clean-containers: ## clean docker containers created during acceptance tests
|
||||
docker compose down --remove-orphans -v
|
||||
|
||||
.PHONY: clean-tests
|
||||
clean-tests:
|
||||
@$(MAKE) --no-print-directory -C ../../../. clean-tests
|
||||
|
||||
.PHONY: clean
|
||||
clean-all: clean-containers clean-dev-image clean-tests ## clean all
|
||||
@@ -0,0 +1,22 @@
|
||||
services:
|
||||
acceptance-tests:
|
||||
image: opencloudeu/php-alpine-ci:8.4
|
||||
working_dir: /woodpecker/src/github.com/qsfera/server
|
||||
command: /bin/bash /test/run-tests.sh
|
||||
environment:
|
||||
OC_ROOT: /woodpecker/src/github.com/qsfera/server
|
||||
TEST_SERVER_URL: ${TEST_SERVER_URL:-https://qsfera-server:9200}
|
||||
OC_WRAPPER_URL: http://qsfera-server:5200
|
||||
STORAGE_DRIVER: ${STORAGE_DRIVER:-posix}
|
||||
BEHAT_SUITE: ${BEHAT_SUITE:-}
|
||||
BEHAT_FEATURE: ${BEHAT_FEATURE:-}
|
||||
USE_BEARER_TOKEN: ${USE_BEARER_TOKEN:-false}
|
||||
# email
|
||||
EMAIL_HOST: email
|
||||
EMAIL_PORT: 9000
|
||||
env_file:
|
||||
- ../../../../.woodpecker.env
|
||||
volumes:
|
||||
- ./run-tests.sh:/test/run-tests.sh
|
||||
- ../../../../:/woodpecker/src/github.com/qsfera/server
|
||||
- ../../../../vendor-bin/behat/composer.json:/tmp/vendor-bin/behat/composer.json
|
||||
@@ -0,0 +1,9 @@
|
||||
services:
|
||||
start_antivirus:
|
||||
image: dadarek/wait-for-dependencies
|
||||
depends_on:
|
||||
- clamav
|
||||
command: clamav:3310
|
||||
clamav:
|
||||
image: opencloudeu/clamav-ci:latest
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
services:
|
||||
start_ceph:
|
||||
image: dadarek/wait-for-dependencies
|
||||
depends_on:
|
||||
- ceph
|
||||
command: ceph:5000
|
||||
ceph:
|
||||
image: ceph/daemon
|
||||
command: demo
|
||||
environment:
|
||||
MON_IP: 127.0.0.1
|
||||
CEPH_PUBLIC_NETWORK: 0.0.0.0/0
|
||||
CEPH_DEMO_UID: test-user
|
||||
CEPH_DEMO_ACCESS_KEY: test
|
||||
CEPH_DEMO_SECRET_KEY: test
|
||||
CEPH_DEMO_BUCKET: test
|
||||
RGW_NAME: ceph
|
||||
@@ -0,0 +1,10 @@
|
||||
services:
|
||||
start_email:
|
||||
image: dadarek/wait-for-dependencies
|
||||
depends_on:
|
||||
- email
|
||||
command: email:9000
|
||||
email:
|
||||
image: inbucket/inbucket
|
||||
ports:
|
||||
- '9000:9000'
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
mkdir -p /var/www/onlyoffice/Data/certs
|
||||
cd /var/www/onlyoffice/Data/certs
|
||||
openssl req -x509 -newkey rsa:4096 -keyout onlyoffice.key -out onlyoffice.crt -sha256 -days 365 -batch -nodes
|
||||
chmod 400 /var/www/onlyoffice/Data/certs/onlyoffice.key
|
||||
|
||||
/app/ds/run-document-server.sh
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
services:
|
||||
qsfera-server:
|
||||
environment:
|
||||
# posix requires a shared cache store
|
||||
STORAGE_USERS_ID_CACHE_STORE: "nats-js-kv"
|
||||
STORAGE_USERS_POSIX_WATCH_FS: "true"
|
||||
@@ -0,0 +1,58 @@
|
||||
services:
|
||||
qsfera-server:
|
||||
image: ${OC_IMAGE:-qsfera/qsfera}:${OC_IMAGE_TAG:-dev}
|
||||
entrypoint: ["/bin/sh", "/usr/bin/serve-qsfera.sh"]
|
||||
user: root
|
||||
environment:
|
||||
WITH_WRAPPER: ${WITH_WRAPPER:-true}
|
||||
OC_URL: "https://qsfera-server:9200"
|
||||
STORAGE_USERS_DRIVER: ${STORAGE_DRIVER:-posix}
|
||||
STORAGE_USERS_POSIX_WATCH_FS: "true"
|
||||
STORAGE_USERS_DRIVER_LOCAL_ROOT: /srv/app/tmp/qsfera/local/root
|
||||
STORAGE_USERS_DRIVER_OC_ROOT: /srv/app/tmp/qsfera/storage/users
|
||||
STORAGE_SYSTEM_DRIVER_OC_ROOT: /srv/app/tmp/qsfera/storage/metadata
|
||||
SHARING_USER_JSON_FILE: /srv/app/tmp/qsfera/shares.json
|
||||
PROXY_ENABLE_BASIC_AUTH: "true"
|
||||
WEB_UI_CONFIG_FILE: /woodpecker/src/github.com/qsfera/server/tests/config/woodpecker/qsfera-config.json
|
||||
OC_INSECURE: "true"
|
||||
IDM_CREATE_DEMO_USERS: "true"
|
||||
IDM_ADMIN_PASSWORD: "admin"
|
||||
FRONTEND_SEARCH_MIN_LENGTH: "2"
|
||||
OC_ADD_RUN_SERVICES: ${OC_ADD_RUN_SERVICES:-}
|
||||
PROXY_HTTP_ADDR: "0.0.0.0:9200"
|
||||
|
||||
# decomposeds3 specific settings
|
||||
STORAGE_USERS_DECOMPOSEDS3_ENDPOINT: http://ceph:8080
|
||||
STORAGE_USERS_DECOMPOSEDS3_REGION: default
|
||||
STORAGE_USERS_DECOMPOSEDS3_ACCESS_KEY: test
|
||||
STORAGE_USERS_DECOMPOSEDS3_SECRET_KEY: test
|
||||
STORAGE_USERS_DECOMPOSEDS3_BUCKET: test
|
||||
# email
|
||||
NOTIFICATIONS_SMTP_HOST: email
|
||||
NOTIFICATIONS_SMTP_PORT: 2500
|
||||
NOTIFICATIONS_SMTP_INSECURE: "true"
|
||||
NOTIFICATIONS_SMTP_SENDER: "КуСфера <noreply@example.com>"
|
||||
NOTIFICATIONS_DEBUG_ADDR: 0.0.0.0:9174
|
||||
|
||||
# antivirus
|
||||
ANTIVIRUS_SCANNER_TYPE: "clamav"
|
||||
ANTIVIRUS_CLAMAV_SOCKET: tcp://clamav:3310
|
||||
|
||||
# postprocessing step
|
||||
POSTPROCESSING_STEPS: ${POSTPROCESSING_STEPS:-}
|
||||
|
||||
# tika
|
||||
SEARCH_EXTRACTOR_TYPE: ${SEARCH_EXTRACTOR_TYPE:-basic}
|
||||
SEARCH_EXTRACTOR_TIKA_TIKA_URL: "http://tika:9998"
|
||||
SEARCH_EXTRACTOR_CS3SOURCE_INSECURE: "true"
|
||||
|
||||
# fonts map for txt thumbnails (including unicode support)
|
||||
THUMBNAILS_TXT_FONTMAP_FILE: "/woodpecker/src/github.com/qsfera/server/tests/config/drone/fontsMap.json"
|
||||
ports:
|
||||
- "9200:9200"
|
||||
- "5200:5200" ## ocwrapper
|
||||
- "9174:9174" ## notifications debug
|
||||
volumes:
|
||||
- ../../../config:/woodpecker/src/github.com/qsfera/server/tests/config
|
||||
- ../../../ocwrapper/bin/ocwrapper:/usr/bin/ocwrapper
|
||||
- ./serve-qsfera.sh:/usr/bin/serve-qsfera.sh
|
||||
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p "${OC_ROOT}/vendor-bin/behat"
|
||||
if [ ! -f "${OC_ROOT}/vendor-bin/behat/composer.json" ]; then
|
||||
cp /tmp/vendor-bin/behat/composer.json "${OC_ROOT}/vendor-bin/behat/composer.json"
|
||||
fi
|
||||
|
||||
git config --global advice.detachedHead false
|
||||
|
||||
## CONFIGURE TEST
|
||||
BEHAT_FILTER_TAGS='~@skip'
|
||||
EXPECTED_FAILURES_FILE=''
|
||||
|
||||
if [ "$STORAGE_DRIVER" = "posix" ]; then
|
||||
BEHAT_FILTER_TAGS+='&&~@skipOnQsfera-posix-Storage'
|
||||
EXPECTED_FAILURES_FILE="${OC_ROOT}/tests/acceptance/expected-failures-posix-storage.md"
|
||||
elif [ "$STORAGE_DRIVER" = "decomposed" ]; then
|
||||
BEHAT_FILTER_TAGS+='&&~@skipOnQsfera-decomposed-Storage'
|
||||
EXPECTED_FAILURES_FILE="${OC_ROOT}/tests/acceptance/expected-failures-decomposed-storage.md"
|
||||
fi
|
||||
|
||||
export BEHAT_FILTER_TAGS
|
||||
export EXPECTED_FAILURES_FILE
|
||||
|
||||
if [ -n "$BEHAT_FEATURE" ]; then
|
||||
export BEHAT_FEATURE
|
||||
echo "[INFO] Running feature: $BEHAT_FEATURE"
|
||||
# allow running without filters if its a feature
|
||||
unset BEHAT_FILTER_TAGS
|
||||
unset BEHAT_SUITE
|
||||
unset EXPECTED_FAILURES_FILE
|
||||
elif [ -n "$BEHAT_SUITE" ]; then
|
||||
export BEHAT_SUITE
|
||||
echo "[INFO] Running suite: $BEHAT_SUITE"
|
||||
unset BEHAT_FEATURE
|
||||
fi
|
||||
|
||||
## RUN TEST
|
||||
sleep 10
|
||||
make -C "$OC_ROOT" test-acceptance-api
|
||||
|
||||
chmod -R 777 "${OC_ROOT}/vendor-bin/"*"/vendor" "${OC_ROOT}/vendor-bin/"*"/composer.lock" "${OC_ROOT}/tests/acceptance/output" 2>/dev/null || true
|
||||
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -xe
|
||||
|
||||
if [ -z "$TEST_GROUP" ]; then
|
||||
echo "TEST_GROUP not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Waiting for collaboration WOPI endpoint..."
|
||||
|
||||
until curl -s http://collaboration:9304 >/dev/null; do
|
||||
echo "Waiting for collaboration WOPI endpoint..."
|
||||
sleep 2
|
||||
done
|
||||
|
||||
echo "Collaboration is up"
|
||||
|
||||
if [ -z "$OC_URL" ]; then
|
||||
OC_URL="https://qsfera-server:9200"
|
||||
fi
|
||||
|
||||
curl -vk -X DELETE "$OC_URL/remote.php/webdav/test.wopitest" -u admin:admin
|
||||
curl -vk -X PUT "$OC_URL/remote.php/webdav/test.wopitest" -u admin:admin -D headers.txt
|
||||
cat headers.txt
|
||||
FILE_ID="$(cat headers.txt | sed -n -e 's/^.*oc-fileid: //Ip')"
|
||||
export FILE_ID
|
||||
URL="$OC_URL/app/open?app_name=FakeOffice&file_id=$FILE_ID"
|
||||
URL="$(echo "$URL" | tr -d '[:cntrl:]')"
|
||||
export URL
|
||||
curl -vk -X POST "$URL" -u admin:admin > open.json
|
||||
cat open.json
|
||||
cat open.json | jq .form_parameters.access_token | tr -d '"' > accesstoken
|
||||
cat open.json | jq .form_parameters.access_token_ttl | tr -d '"' > accesstokenttl
|
||||
WOPI_FILE_ID="$(cat open.json | jq .app_url | sed -n -e 's/^.*files%2F//p' | tr -d '"')"
|
||||
echo "http://collaboration:9300/wopi/files/$WOPI_FILE_ID" > wopisrc
|
||||
|
||||
WOPI_TOKEN=$(cat accesstoken)
|
||||
export WOPI_TOKEN
|
||||
WOPI_TTL=$(cat accesstokenttl)
|
||||
export WOPI_TTL
|
||||
WOPI_SRC=$(cat wopisrc)
|
||||
export WOPI_SRC
|
||||
|
||||
/app/Microsoft.Office.WopiValidator -s -t "$WOPI_TOKEN" -w "$WOPI_SRC" -l "$WOPI_TTL" --testgroup $TEST_GROUP
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# init КуСфера
|
||||
qsfera init
|
||||
|
||||
if [ "$WITH_WRAPPER" = "true" ]; then
|
||||
ocwrapper serve --bin=qsfera
|
||||
else
|
||||
qsfera server
|
||||
fi
|
||||
@@ -0,0 +1,8 @@
|
||||
services:
|
||||
tika-service:
|
||||
image: dadarek/wait-for-dependencies
|
||||
depends_on:
|
||||
- tika
|
||||
command: tika:9998
|
||||
tika:
|
||||
image: apache/tika:3.2.3.0-full
|
||||
@@ -0,0 +1,86 @@
|
||||
services:
|
||||
fakeoffice:
|
||||
image: owncloudci/alpine:latest
|
||||
entrypoint: /bin/sh
|
||||
command:
|
||||
[
|
||||
"-c",
|
||||
"while true; do echo -e \"HTTP/1.1 200 OK\n\n$(cat /hosting-discovery.xml)\" | nc -l -k -p 8080; done",
|
||||
]
|
||||
ports:
|
||||
- 8080:8080
|
||||
extra_hosts:
|
||||
- qsfera.local:${DOCKER_HOST:-host-gateway}
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080"]
|
||||
volumes:
|
||||
- ./../../../config/woodpecker/hosting-discovery.xml:/hosting-discovery.xml
|
||||
|
||||
qsfera:
|
||||
image: qsfera/qsfera:dev
|
||||
container_name: qsfera-server
|
||||
ports:
|
||||
- 9200:9200
|
||||
entrypoint: /bin/sh
|
||||
command: ["-c", "qsfera init || true; sleep 10; qsfera server"]
|
||||
environment:
|
||||
OC_URL: https://qsfera-server:9200
|
||||
OC_CONFIG_DIR: /etc/qsfera
|
||||
STORAGE_USERS_DRIVER: posix
|
||||
PROXY_ENABLE_BASIC_AUTH: true
|
||||
OC_LOG_LEVEL: error
|
||||
OC_LOG_COLOR: false
|
||||
OC_INSECURE: true
|
||||
IDM_ADMIN_PASSWORD: admin
|
||||
GATEWAY_GRPC_ADDR: 0.0.0.0:9142
|
||||
NATS_NATS_HOST: 0.0.0.0
|
||||
NATS_NATS_PORT: 9233
|
||||
volumes:
|
||||
- config:/etc/qsfera
|
||||
depends_on:
|
||||
fakeoffice:
|
||||
condition: service_healthy
|
||||
|
||||
collaboration:
|
||||
image: qsfera/qsfera:dev
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 9300:9300
|
||||
entrypoint:
|
||||
- /bin/sh
|
||||
command: ["-c", "qsfera collaboration server"]
|
||||
environment:
|
||||
OC_CONFIG_DIR: /etc/qsfera
|
||||
MICRO_REGISTRY: nats-js-kv
|
||||
MICRO_REGISTRY_ADDRESS: qsfera:9233
|
||||
COLLABORATION_LOG_LEVEL: info
|
||||
COLLABORATION_GRPC_ADDR: 0.0.0.0:9301
|
||||
COLLABORATION_HTTP_ADDR: 0.0.0.0:9300
|
||||
COLLABORATION_DEBUG_ADDR: 0.0.0.0:9304
|
||||
COLLABORATION_APP_PROOF_DISABLE: true
|
||||
COLLABORATION_APP_INSECURE: true
|
||||
COLLABORATION_CS3API_DATAGATEWAY_INSECURE: true
|
||||
COLLABORATION_WOPI_SECRET: some-wopi-secret
|
||||
COLLABORATION_SERVICE_NAME: collaboration-fakeoffice
|
||||
COLLABORATION_APP_NAME: FakeOffice
|
||||
COLLABORATION_APP_PRODUCT: Microsoft
|
||||
COLLABORATION_APP_ADDR: http://fakeoffice:8080
|
||||
COLLABORATION_WOPI_SRC: http://collaboration:9300
|
||||
volumes:
|
||||
- config:/etc/qsfera
|
||||
depends_on:
|
||||
- qsfera
|
||||
|
||||
wopi-validator:
|
||||
image: ${WOPI_VALIDATOR_IMAGE:-opencloudeu/wopi-validator-ci}
|
||||
volumes:
|
||||
- ./run-wopi-validator.sh:/app/run-wopi-validator.sh
|
||||
environment:
|
||||
TEST_GROUP: ${TEST_GROUP:-PutRelativeFile}
|
||||
entrypoint: /app/run-wopi-validator.sh
|
||||
depends_on:
|
||||
- collaboration
|
||||
restart: "on-failure"
|
||||
|
||||
volumes:
|
||||
config:
|
||||
@@ -0,0 +1,105 @@
|
||||
x-common_config: &common_config
|
||||
image: qsfera/qsfera:dev
|
||||
restart: unless-stopped
|
||||
entrypoint: /bin/sh
|
||||
command: ["-c", "qsfera collaboration server"]
|
||||
user: root
|
||||
|
||||
x-common_env: &common_env
|
||||
OC_CONFIG_DIR: /etc/qsfera
|
||||
MICRO_REGISTRY: nats-js-kv
|
||||
MICRO_REGISTRY_ADDRESS: qsfera-server:9233
|
||||
COLLABORATION_LOG_LEVEL: info
|
||||
COLLABORATION_GRPC_ADDR: 0.0.0.0:9301
|
||||
COLLABORATION_HTTP_ADDR: 0.0.0.0:9300
|
||||
COLLABORATION_DEBUG_ADDR: 0.0.0.0:9304
|
||||
COLLABORATION_APP_PROOF_DISABLE: true
|
||||
COLLABORATION_APP_INSECURE: true
|
||||
COLLABORATION_CS3API_DATAGATEWAY_INSECURE: true
|
||||
COLLABORATION_WOPI_SECRET: some-wopi-secret
|
||||
|
||||
x-config_volume: &config_volume
|
||||
- config:/etc/qsfera
|
||||
|
||||
x-depends_on: &depends_on
|
||||
- qsfera-server
|
||||
|
||||
services:
|
||||
qsfera-server:
|
||||
environment:
|
||||
OC_CONFIG_DIR: /etc/qsfera
|
||||
GATEWAY_GRPC_ADDR: 0.0.0.0:9142
|
||||
NATS_NATS_HOST: 0.0.0.0
|
||||
NATS_NATS_PORT: 9233
|
||||
volumes: *config_volume
|
||||
|
||||
fakeoffice:
|
||||
image: alpine:latest
|
||||
entrypoint: /bin/sh
|
||||
command:
|
||||
[
|
||||
"-c",
|
||||
"while true; do echo -e \"HTTP/1.1 200 OK\n\n$(cat /fakeoffice-discovery.xml)\" | nc -l -k -p 8080; done",
|
||||
]
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://fakeoffice:8080"]
|
||||
volumes:
|
||||
- ./../../../config/woodpecker/hosting-discovery.xml:/fakeoffice-discovery.xml
|
||||
|
||||
collabora:
|
||||
image: collabora/code:24.04.5.1.1
|
||||
environment:
|
||||
DONT_GEN_SSL_CERT: set
|
||||
extra_params: --o:ssl.enable=true --o:ssl.termination=true --o:welcome.enable=false --o:net.frame_ancestors=https://qsfera-server:9200
|
||||
entrypoint: /bin/sh
|
||||
command: ["-c", "coolconfig generate-proof-key; /start-collabora-online.sh"]
|
||||
|
||||
onlyoffice:
|
||||
image: onlyoffice/documentserver:7.5.1
|
||||
environment:
|
||||
WOPI_ENABLED: true
|
||||
USE_UNAUTHORIZED_STORAGE: true
|
||||
entrypoint: bash /entrypoint.sh
|
||||
volumes:
|
||||
- ./onlyoffice-entrypoint.sh:/entrypoint.sh
|
||||
|
||||
collaboration-fakeoffice:
|
||||
<<: *common_config
|
||||
environment:
|
||||
<<: *common_env
|
||||
COLLABORATION_SERVICE_NAME: collaboration-fakeoffice
|
||||
COLLABORATION_APP_NAME: FakeOffice
|
||||
COLLABORATION_APP_PRODUCT: Microsoft
|
||||
COLLABORATION_APP_ADDR: http://fakeoffice:8080
|
||||
COLLABORATION_WOPI_SRC: http://collaboration-fakeoffice:9300
|
||||
volumes: *config_volume
|
||||
depends_on: *depends_on
|
||||
|
||||
collaboration-collabora:
|
||||
<<: *common_config
|
||||
environment:
|
||||
<<: *common_env
|
||||
COLLABORATION_SERVICE_NAME: collaboration-collabora
|
||||
COLLABORATION_APP_NAME: Collabora
|
||||
COLLABORATION_APP_PRODUCT: Collabora
|
||||
COLLABORATION_APP_ADDR: https://collabora:9980
|
||||
COLLABORATION_APP_ICON: https://collabora:9980/favicon.ico
|
||||
COLLABORATION_WOPI_SRC: http://collaboration-collabora:9300
|
||||
volumes: *config_volume
|
||||
depends_on: *depends_on
|
||||
|
||||
collaboration-onlyoffice:
|
||||
<<: *common_config
|
||||
environment:
|
||||
<<: *common_env
|
||||
COLLABORATION_SERVICE_NAME: collaboration-onlyoffice
|
||||
COLLABORATION_APP_NAME: OnlyOffice
|
||||
COLLABORATION_APP_PRODUCT: OnlyOffice
|
||||
COLLABORATION_APP_ADDR: https://onlyoffice
|
||||
COLLABORATION_APP_ICON: https://onlyoffice/web-apps/apps/documenteditor/main/resources/img/favicon.ico
|
||||
COLLABORATION_WOPI_SRC: http://collaboration-onlyoffice:9300
|
||||
volumes: *config_volume
|
||||
depends_on: *depends_on
|
||||
|
||||
volumes:
|
||||
config:
|
||||
Reference in New Issue
Block a user