dever %!s(int64=7) %!d(string=hai) anos
pai
achega
dc6833120d

+ 21 - 0
src/docker/build/office/convert/Dockerfile

@@ -0,0 +1,21 @@
+FROM docker.dever.cc/office/libreoffice:latest
+
+MAINTAINER Rabin "https://github.com/shemic"
+
+ENV DEMETER_HOME=/usr/local/convert
+ENV DEMETER_CONF=env
+ENV PATH=$PATH:$DEMETER_HOME
+
+RUN apk add --no-cache --update gcc curl gcc g++ python-dev && \
+	pip install --upgrade pip && \
+	pip install redis && \
+	pip install -U git+http://git.dever.cc:3000/python/demeter.git && \
+	git clone http://git.dever.cc:3000/python/convert.git $DEMETER_HOME && \
+	chmod -R +x $DEMETER_HOME/*.py && \
+	apk del curl gcc g++ python-dev
+
+EXPOSE 8087 8088
+
+COPY convert.sh /entrypoint/convert.sh
+
+CMD ["convert"]

+ 18 - 0
src/docker/build/office/convert/convert.sh

@@ -0,0 +1,18 @@
+#!/usr/bin/env sh
+set -e
+
+start_nginx()
+{
+	#exec nginx
+	process_start nginx
+}
+
+stop_nginx()
+{
+    nginx -s stop
+}
+
+monit_nginx()
+{
+	process_monit nginx
+}

+ 10 - 0
src/docker/build/office/libreoffice/Dockerfile

@@ -0,0 +1,10 @@
+FROM docker.dever.cc/office/pdf2htmlex:latest
+
+MAINTAINER Rabin "https://github.com/shemic"
+
+RUN apk update && apk add --no-cache libreoffice font-adobe-100dpi && \
+	cd /usr/share/fonts && \
+	git clone http://git.dever.cc:3000/rabin/fonts.git win && \
+	cd win && \
+	chmod -Rf 755 * && \
+	mkfontscale && mkfontdir && fc-cache –fv

+ 3 - 0
src/docker/build/office/pdf2htmlex/Dockerfile

@@ -0,0 +1,3 @@
+FROM bwits/pdf2htmlex-alpine
+
+MAINTAINER Rabin "https://github.com/shemic"

+ 6 - 0
src/docker/conf/office.conf

@@ -0,0 +1,6 @@
+[base]
+path = {base}
+network = office
+
+[convert]
+port = 9907:9907

+ 6 - 1
src/docker/core.conf

@@ -104,4 +104,9 @@ project_onepage		= project/onepage
 ;spider
 xvfb_firefox        = spider/xvfb/firefox
 xvfb_chrome         = spider/xvfb/chrome
-phantomjs           = spider/phantomjs
+phantomjs           = spider/phantomjs
+
+;office
+libreoffice			= office/libreoffice
+pdf2htmlex			= office/pdf2htmlex
+convert				= office/convert