mirror of
https://github.com/bigbluebutton/docker.git
synced 2025-06-15 01:16:43 +02:00
office-conversion: switch from jodconverter to collabora
This commit is contained in:
parent
c740f55e5a
commit
c298e051fc
@ -19,6 +19,7 @@ services:
|
|||||||
- redis
|
- redis
|
||||||
- etherpad
|
- etherpad
|
||||||
- bbb-pads
|
- bbb-pads
|
||||||
|
- collabora
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: wget --no-proxy --no-verbose --tries=1 --spider http://10.7.7.2:8090/bigbluebutton/api || exit 1
|
test: wget --no-proxy --no-verbose --tries=1 --spider http://10.7.7.2:8090/bigbluebutton/api || exit 1
|
||||||
start_period: 2m
|
start_period: 2m
|
||||||
@ -298,21 +299,18 @@ services:
|
|||||||
bbb-net:
|
bbb-net:
|
||||||
ipv4_address: 10.7.7.32
|
ipv4_address: 10.7.7.32
|
||||||
|
|
||||||
jodconverter:
|
collabora:
|
||||||
build: mod/jodconverter
|
image: collabora/code:latest
|
||||||
image: alangecker/bbb-docker-jodconverter:latest
|
|
||||||
security_opt:
|
|
||||||
- 'no-new-privileges:true'
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- /tmp
|
- /tmp
|
||||||
deploy:
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
memory: 512M
|
|
||||||
networks:
|
networks:
|
||||||
bbb-net:
|
bbb-net:
|
||||||
ipv4_address: 10.7.7.20
|
ipv4_address: 10.7.7.20
|
||||||
|
# disable logging (way to verbose)
|
||||||
|
logging:
|
||||||
|
driver: none
|
||||||
|
|
||||||
|
|
||||||
periodic:
|
periodic:
|
||||||
build: mod/periodic
|
build: mod/periodic
|
||||||
|
@ -7,6 +7,8 @@ PATH="/bin/:/usr/bin/"
|
|||||||
# Param 1: Input office file path (e.g. "/tmp/test.odt")
|
# Param 1: Input office file path (e.g. "/tmp/test.odt")
|
||||||
# Param 2: Output pdf file path (e.g. "/tmp/test.pdf")
|
# Param 2: Output pdf file path (e.g. "/tmp/test.pdf")
|
||||||
# Param 3: Destination Format (pdf default)
|
# Param 3: Destination Format (pdf default)
|
||||||
|
# Param 4: Timeout (secs) (optional)
|
||||||
|
|
||||||
if (( $# == 0 )); then
|
if (( $# == 0 )); then
|
||||||
echo "Missing parameter 1 (Input office file path)";
|
echo "Missing parameter 1 (Input office file path)";
|
||||||
exit 1
|
exit 1
|
||||||
@ -16,15 +18,19 @@ elif (( $# == 1 )); then
|
|||||||
fi;
|
fi;
|
||||||
|
|
||||||
|
|
||||||
source="${1}"
|
source="$1"
|
||||||
dest="${2}"
|
dest="$2"
|
||||||
|
|
||||||
#If output format is missing, define PDF
|
# If output format is missing, define PDF
|
||||||
convertTo="${3:-pdf}"
|
convertTo="${3:-pdf}"
|
||||||
|
|
||||||
curl -v -X POST "http://jodconverter:8080/lool/convert-to/$convertTo" \
|
# If timeout is missing, define 60
|
||||||
-H "accept: application/octet-stream" \
|
timeoutSecs="${4:-60}"
|
||||||
-H "Content-Type: multipart/form-data" \
|
# Truncate timeout to max 3 digits (as expected by sudoers)
|
||||||
-F "data=@${source}" > "${dest}"
|
timeoutSecs="${timeoutSecs:0:3}"
|
||||||
|
|
||||||
exit 0
|
# The timeout is important.
|
||||||
|
|
||||||
|
timeout $(printf %03d $timeoutSecs)s curl -F "data=@${source}" -k https://collabora:9980/cool/convert-to/$convertTo > "${dest}"
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
FROM ghcr.io/jodconverter/jodconverter-examples:rest
|
|
||||||
RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | debconf-set-selections
|
|
||||||
RUN sed -i 's/main/main contrib/' /etc/apt/sources.list.d/debian.sources && apt-get update
|
|
||||||
RUN apt-get update && apt -y install --no-install-recommends \
|
|
||||||
fonts-arkpandora \
|
|
||||||
fonts-crosextra-carlito \
|
|
||||||
fonts-crosextra-caladea \
|
|
||||||
fonts-noto \
|
|
||||||
fonts-noto-cjk \
|
|
||||||
fonts-liberation \
|
|
||||||
fontconfig \
|
|
||||||
ttf-mscorefonts-installer
|
|
||||||
|
|
||||||
|
|
||||||
# avoid "APPLICATION FAILED TO START. Config data location '/etc/app/' does not exist"
|
|
||||||
# https://github.com/bigbluebutton/docker/issues/178
|
|
||||||
CMD ["--spring.config.additional-location=optional:/etc/app/"]
|
|
Loading…
x
Reference in New Issue
Block a user