Merge pull request #8984 from owncloud/fix/wopi-example-healthcheck
fix: use docker healthcheck
This commit is contained in:
-19
@@ -1,19 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
apk add curl
|
|
||||||
|
|
||||||
#TODO: app driver itself should try again until Collabora is up...
|
|
||||||
|
|
||||||
retries=10
|
|
||||||
while [[ $retries -gt 0 ]]; do
|
|
||||||
if curl --silent --show-error --fail http://collabora:9980/hosting/discovery > /dev/null; then
|
|
||||||
ocis app-provider server
|
|
||||||
else
|
|
||||||
echo "Collabora is not yet available, trying again in 10 seconds"
|
|
||||||
sleep 10
|
|
||||||
retries=$((retries - 1))
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo 'Collabora was not available after 100 seconds'
|
|
||||||
exit 1
|
|
||||||
-19
@@ -1,19 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
apk add curl
|
|
||||||
|
|
||||||
#TODO: app driver itself should try again until OnlyOffice is up...
|
|
||||||
|
|
||||||
retries=10
|
|
||||||
while [[ $retries -gt 0 ]]; do
|
|
||||||
if curl --silent --show-error --fail http://onlyoffice/hosting/discovery > /dev/null; then
|
|
||||||
ocis app-provider server
|
|
||||||
else
|
|
||||||
echo "OnlyOffice is not yet available, trying again in 10 seconds"
|
|
||||||
sleep 10
|
|
||||||
retries=$((retries - 1))
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo 'OnlyOffice was not available after 100 seconds'
|
|
||||||
exit 1
|
|
||||||
@@ -110,10 +110,6 @@ services:
|
|||||||
image: owncloud/ocis:${OCIS_DOCKER_TAG:-latest}
|
image: owncloud/ocis:${OCIS_DOCKER_TAG:-latest}
|
||||||
networks:
|
networks:
|
||||||
ocis-net:
|
ocis-net:
|
||||||
user: "0" # needed for apk add in entrypoint script
|
|
||||||
entrypoint:
|
|
||||||
- /bin/sh
|
|
||||||
- /entrypoint-override.sh
|
|
||||||
command: app-provider server
|
command: app-provider server
|
||||||
environment:
|
environment:
|
||||||
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-info}
|
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-info}
|
||||||
@@ -134,22 +130,20 @@ services:
|
|||||||
# share the registry with the ocis container
|
# share the registry with the ocis container
|
||||||
MICRO_REGISTRY_ADDRESS: ocis:9233
|
MICRO_REGISTRY_ADDRESS: ocis:9233
|
||||||
volumes:
|
volumes:
|
||||||
- ./config/ocis-appprovider-collabora/entrypoint-override.sh:/entrypoint-override.sh
|
|
||||||
- ocis-config:/etc/ocis
|
- ocis-config:/etc/ocis
|
||||||
logging:
|
logging:
|
||||||
driver: ${LOG_DRIVER:-local}
|
driver: ${LOG_DRIVER:-local}
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- ocis
|
ocis:
|
||||||
|
condition: service_started
|
||||||
|
collabora:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
ocis-appprovider-onlyoffice:
|
ocis-appprovider-onlyoffice:
|
||||||
image: owncloud/ocis:${OCIS_DOCKER_TAG:-latest}
|
image: owncloud/ocis:${OCIS_DOCKER_TAG:-latest}
|
||||||
networks:
|
networks:
|
||||||
ocis-net:
|
ocis-net:
|
||||||
user: "0" # needed for apk add in entrypoint script
|
|
||||||
entrypoint:
|
|
||||||
- /bin/sh
|
|
||||||
- /entrypoint-override.sh
|
|
||||||
#command: app-provider server
|
#command: app-provider server
|
||||||
environment:
|
environment:
|
||||||
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-info}
|
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-info}
|
||||||
@@ -170,13 +164,15 @@ services:
|
|||||||
# share the registry with the ocis container
|
# share the registry with the ocis container
|
||||||
MICRO_REGISTRY_ADDRESS: ocis:9233
|
MICRO_REGISTRY_ADDRESS: ocis:9233
|
||||||
volumes:
|
volumes:
|
||||||
- ./config/ocis-appprovider-onlyoffice/entrypoint-override.sh:/entrypoint-override.sh
|
|
||||||
- ocis-config:/etc/ocis
|
- ocis-config:/etc/ocis
|
||||||
logging:
|
logging:
|
||||||
driver: ${LOG_DRIVER:-local}
|
driver: ${LOG_DRIVER:-local}
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- ocis
|
ocis:
|
||||||
|
condition: service_started
|
||||||
|
onlyoffice:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
wopiserver:
|
wopiserver:
|
||||||
image: cs3org/wopiserver:${WOPISERVER_DOCKER_TAG:-v10.3.0}
|
image: cs3org/wopiserver:${WOPISERVER_DOCKER_TAG:-v10.3.0}
|
||||||
@@ -226,6 +222,8 @@ services:
|
|||||||
logging:
|
logging:
|
||||||
driver: ${LOG_DRIVER:-local}
|
driver: ${LOG_DRIVER:-local}
|
||||||
restart: always
|
restart: always
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-f", "http://localhost:9980/hosting/discovery"]
|
||||||
|
|
||||||
onlyoffice:
|
onlyoffice:
|
||||||
image: onlyoffice/documentserver:7.5.0
|
image: onlyoffice/documentserver:7.5.0
|
||||||
@@ -253,6 +251,8 @@ services:
|
|||||||
logging:
|
logging:
|
||||||
driver: ${LOG_DRIVER:-local}
|
driver: ${LOG_DRIVER:-local}
|
||||||
restart: always
|
restart: always
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-f", "http://localhost/hosting/discovery"]
|
||||||
|
|
||||||
tika:
|
tika:
|
||||||
image: ${TIKA_IMAGE:-apache/tika:latest-full}
|
image: ${TIKA_IMAGE:-apache/tika:latest-full}
|
||||||
|
|||||||
Reference in New Issue
Block a user