mirror of
https://github.com/bigbluebutton/docker.git
synced 2025-06-13 00:16:45 +02:00
office-conversion: switch from jodconverter to collabora
This commit is contained in:
parent
c740f55e5a
commit
c298e051fc
@ -19,6 +19,7 @@ services:
|
||||
- redis
|
||||
- etherpad
|
||||
- bbb-pads
|
||||
- collabora
|
||||
healthcheck:
|
||||
test: wget --no-proxy --no-verbose --tries=1 --spider http://10.7.7.2:8090/bigbluebutton/api || exit 1
|
||||
start_period: 2m
|
||||
@ -298,21 +299,18 @@ services:
|
||||
bbb-net:
|
||||
ipv4_address: 10.7.7.32
|
||||
|
||||
jodconverter:
|
||||
build: mod/jodconverter
|
||||
image: alangecker/bbb-docker-jodconverter:latest
|
||||
security_opt:
|
||||
- 'no-new-privileges:true'
|
||||
collabora:
|
||||
image: collabora/code:latest
|
||||
restart: unless-stopped
|
||||
tmpfs:
|
||||
- /tmp
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 512M
|
||||
networks:
|
||||
bbb-net:
|
||||
ipv4_address: 10.7.7.20
|
||||
# disable logging (way to verbose)
|
||||
logging:
|
||||
driver: none
|
||||
|
||||
|
||||
periodic:
|
||||
build: mod/periodic
|
||||
|
@ -7,6 +7,8 @@ PATH="/bin/:/usr/bin/"
|
||||
# Param 1: Input office file path (e.g. "/tmp/test.odt")
|
||||
# Param 2: Output pdf file path (e.g. "/tmp/test.pdf")
|
||||
# Param 3: Destination Format (pdf default)
|
||||
# Param 4: Timeout (secs) (optional)
|
||||
|
||||
if (( $# == 0 )); then
|
||||
echo "Missing parameter 1 (Input office file path)";
|
||||
exit 1
|
||||
@ -16,15 +18,19 @@ elif (( $# == 1 )); then
|
||||
fi;
|
||||
|
||||
|
||||
source="${1}"
|
||||
dest="${2}"
|
||||
source="$1"
|
||||
dest="$2"
|
||||
|
||||
#If output format is missing, define PDF
|
||||
# If output format is missing, define PDF
|
||||
convertTo="${3:-pdf}"
|
||||
|
||||
curl -v -X POST "http://jodconverter:8080/lool/convert-to/$convertTo" \
|
||||
-H "accept: application/octet-stream" \
|
||||
-H "Content-Type: multipart/form-data" \
|
||||
-F "data=@${source}" > "${dest}"
|
||||
# If timeout is missing, define 60
|
||||
timeoutSecs="${4:-60}"
|
||||
# Truncate timeout to max 3 digits (as expected by sudoers)
|
||||
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