Merge pull request #10 from ONLYOFFICE/feature/docker-compose
Feature/docker compose
This commit is contained in:
commit
d0e1228330
|
@ -34,8 +34,11 @@ services:
|
||||||
- onlyoffice-redis
|
- onlyoffice-redis
|
||||||
- onlyoffice-rabbitmq
|
- onlyoffice-rabbitmq
|
||||||
environment:
|
environment:
|
||||||
- HTTP_CHECK=HEAD /healthcheck
|
- BALANCE=uri depth 3
|
||||||
- EXTRA_SETTINGS=http-check expect status 200
|
- HTTP_CHECK=GET /healthcheck
|
||||||
|
- EXTRA_SETTINGS=http-check expect string true
|
||||||
|
# Uncomment the string below to redirect HTTP request to HTTPS request.
|
||||||
|
#- FORCE_SSL=true
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
tty: true
|
tty: true
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -43,24 +46,27 @@ services:
|
||||||
- onlyoffice
|
- onlyoffice
|
||||||
expose:
|
expose:
|
||||||
- '80'
|
- '80'
|
||||||
- '443'
|
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- onlyoffice-documentserver-data
|
- onlyoffice-documentserver-data
|
||||||
|
|
||||||
onlyoffice-haproxy:
|
onlyoffice-haproxy:
|
||||||
container_name: onlyoffice-haproxy
|
container_name: onlyoffice-haproxy
|
||||||
image: dockercloud/haproxy:1.2.1
|
image: dockercloud/haproxy:1.5.1
|
||||||
depends_on:
|
depends_on:
|
||||||
- onlyoffice-documentserver
|
- onlyoffice-documentserver
|
||||||
environment:
|
environment:
|
||||||
- MODE=tcp
|
- MODE=http
|
||||||
- TCP_PORTS="80, 443"
|
# Uncomment the string below to specify the path of ssl certificates
|
||||||
|
#- CERT_FOLDER=/certs/
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
tty: true
|
tty: true
|
||||||
links:
|
links:
|
||||||
- onlyoffice-documentserver
|
- onlyoffice-documentserver
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
# Uncomment the string below to map a ssl certificate from host
|
||||||
|
# to the proxy container
|
||||||
|
#- /app/onlyoffice/DocumentServer/data/certs/onlyoffice.pem:/certs/cert1.pem
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- onlyoffice
|
- onlyoffice
|
||||||
|
|
|
@ -100,8 +100,6 @@ start_nginx(){
|
||||||
if [ -f "${SSL_CERTIFICATE_PATH}" -a -f "${SSL_KEY_PATH}" ]; then
|
if [ -f "${SSL_CERTIFICATE_PATH}" -a -f "${SSL_KEY_PATH}" ]; then
|
||||||
cp ${SYSCONF_TEMPLATES_DIR}/nginx/onlyoffice-documentserver-ssl.conf ${NGINX_ONLYOFFICE_PATH}
|
cp ${SYSCONF_TEMPLATES_DIR}/nginx/onlyoffice-documentserver-ssl.conf ${NGINX_ONLYOFFICE_PATH}
|
||||||
|
|
||||||
mkdir ${DATA_DIR}
|
|
||||||
|
|
||||||
# configure nginx
|
# configure nginx
|
||||||
sed 's,{{SSL_CERTIFICATE_PATH}},'"${SSL_CERTIFICATE_PATH}"',' -i ${NGINX_ONLYOFFICE_PATH}
|
sed 's,{{SSL_CERTIFICATE_PATH}},'"${SSL_CERTIFICATE_PATH}"',' -i ${NGINX_ONLYOFFICE_PATH}
|
||||||
sed 's,{{SSL_KEY_PATH}},'"${SSL_KEY_PATH}"',' -i ${NGINX_ONLYOFFICE_PATH}
|
sed 's,{{SSL_KEY_PATH}},'"${SSL_KEY_PATH}"',' -i ${NGINX_ONLYOFFICE_PATH}
|
||||||
|
@ -186,4 +184,4 @@ if [ ${ONLYOFFICE_DATA_CONTAINER} != "true" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Regenerate the fonts list and the fonts thumbnails
|
# Regenerate the fonts list and the fonts thumbnails
|
||||||
documentserver-generate-allfonts.sh ${ONLYOFFICE_DATA_CONTAINER}
|
documentserver-generate-allfonts.sh ${ONLYOFFICE_DATA_CONTAINER}
|
||||||
|
|
Loading…
Reference in a new issue