-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update nginx configs from document-server-package (#79)
* Update nginx configs from document-server-package * Remove escess files * Small changes * Update config version from archive
- Loading branch information
1 parent
7d63d6c
commit 528b6fc
Showing
3 changed files
with
42 additions
and
243 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,6 +97,14 @@ parts: | |
/usr/lib/update-notifier/package-data-downloader | ||
fi | ||
cp -r /usr/share/fonts/truetype/msttcorefonts $SNAPCRAFT_PART_INSTALL/usr/share/fonts/truetype | ||
#temporary | ||
rm -r $SNAPCRAFT_PART_INSTALL/core-fonts | ||
rm -r $SNAPCRAFT_PART_INSTALL/sdkjs | ||
rm -r $SNAPCRAFT_PART_INSTALL/sdkjs-plugins | ||
rm -r $SNAPCRAFT_PART_INSTALL/server | ||
rm -r $SNAPCRAFT_PART_INSTALL/web-apps | ||
rm -r $SNAPCRAFT_PART_INSTALL/example | ||
# | ||
DIR="$SNAPCRAFT_PART_INSTALL/var/www/onlyoffice/documentserver" | ||
rm -r $DIR/server/welcome | ||
DIR_ETC="$SNAPCRAFT_PART_INSTALL/etc/onlyoffice/documentserver" | ||
|
@@ -120,6 +128,10 @@ parts: | |
ln -s -f $OUTDIR/sdkjs/slide/themes $DIR/sdkjs/slide/themes | ||
ln -s -f $OUTDIR/sdkjs/common/Images/themes_thumbnail.png $DIR/sdkjs/common/Images/themes_thumbnail.png | ||
ln -s -f $OUTDIR/sdkjs/common/Images/[email protected] $DIR/sdkjs/common/Images/[email protected] | ||
#package version | ||
BUILD_VERSION=`cat var/www/onlyoffice/documentserver/server/Common/sources/commondefines.js | grep "const buildVersion" | grep -o "[0-9.]*"` | ||
BUILD_NUMBER=`cat var/www/onlyoffice/documentserver/server/Common/sources/commondefines.js | grep "const buildNumber" | grep -o "[0-9]*"` | ||
echo $BUILD_VERSION-$BUILD_NUMBER > $SNAPCRAFT_STAGE/version | ||
node: | ||
plugin: dump | ||
|
@@ -271,11 +283,14 @@ parts: | |
source: src/common/ | ||
|
||
ds-package: | ||
after: | ||
- server | ||
plugin: nil | ||
source: https://github.com/ONLYOFFICE/document-server-package.git | ||
source-type: git | ||
override-build: | | ||
snapcraftctl build | ||
PACKAGE_VERSION=`cat $SNAPCRAFT_STAGE/version` | ||
#welcome page | ||
mkdir -p $SNAPCRAFT_PART_INSTALL/var/www/onlyoffice/documentserver/server/welcome | ||
cp -r common/documentserver-example/welcome/css $SNAPCRAFT_PART_INSTALL/var/www/onlyoffice/documentserver/server/welcome | ||
|
@@ -284,7 +299,33 @@ parts: | |
sed -i -e 's/sudo supervisorctl start ds:example/sudo snap set onlyoffice-ds onlyoffice.example-enabled=true/' $SNAPCRAFT_PART_INSTALL/var/www/onlyoffice/documentserver/server/welcome/index.html | ||
sed -i -e '/<h3>Add it to the autostart/d' $SNAPCRAFT_PART_INSTALL/var/www/onlyoffice/documentserver/server/welcome/index.html | ||
sed -i -e '/<pre>sudo sed/d' $SNAPCRAFT_PART_INSTALL/var/www/onlyoffice/documentserver/server/welcome/index.html | ||
#nginx configs | ||
NGINX_DIR=$SNAPCRAFT_PART_INSTALL/etc/onlyoffice/documentserver/nginx | ||
mkdir -p $NGINX_DIR/includes | ||
##ds.conf.tmpl | ||
cp common/documentserver/nginx/ds.conf.tmpl.m4 $NGINX_DIR/ds.conf.tmpl | ||
sed -i -e 's/M4_NGINX_CONF/\/snap\/onlyoffice-ds\/current\/etc\/onlyoffice\/documentserver\/nginx\/includes/' $NGINX_DIR/ds.conf.tmpl | ||
sed -i -e 's/80/DS_PORT/' $NGINX_DIR/ds.conf.tmpl | ||
##ds-ssl.conf.tmpl | ||
cp common/documentserver/nginx/ds-ssl.conf.tmpl.m4 $NGINX_DIR/ds-ssl.conf.tmpl | ||
sed -i -e 's/M4_NGINX_CONF/\/snap\/onlyoffice-ds\/current\/etc\/onlyoffice\/documentserver\/nginx\/includes/' $NGINX_DIR/ds-ssl.conf.tmpl | ||
sed -i -e 's/80/DS_PORT/' $NGINX_DIR/ds-ssl.conf.tmpl | ||
sed -i -e 's/443/DSS_PORT/' $NGINX_DIR/ds-ssl.conf.tmpl | ||
##ds-common.conf | ||
cp common/documentserver/nginx/includes/ds-common.conf.m4 $NGINX_DIR/includes/ds-common.conf | ||
sed -i -e 's/M4_NGINX_LOG/\/var\/snap\/onlyoffice-ds\/current\/var\/log\/nginx/' $NGINX_DIR/includes/ds-common.conf | ||
##ds-docservice.conf | ||
cp common/documentserver/nginx/includes/ds-docservice.conf.m4 $NGINX_DIR/includes/ds-docservice.conf | ||
sed -i -e 's/M4_DS_ROOT/\/snap\/onlyoffice-ds\/current\/var\/www\/onlyoffice\/documentserver/' $NGINX_DIR/includes/ds-docservice.conf | ||
sed -i -e "s/M4_PACKAGE_VERSION/$PACKAGE_VERSION/" $NGINX_DIR/includes/ds-docservice.conf | ||
sed -i -e 's/M4_DEV_NULL/\/dev\/null/' $NGINX_DIR/includes/ds-docservice.conf | ||
sed -i -e 's/M4_DS_FILES/\/var\/snap\/onlyoffice-ds\/common\/var\/lib\/onlyoffice\/documentserver/' $NGINX_DIR/includes/ds-docservice.conf | ||
##http-common.conf | ||
cp common/documentserver/nginx/includes/http-common.conf.m4 $NGINX_DIR/includes/http-common.conf | ||
##ds-example.conf | ||
cp common/documentserver-example/nginx/includes/ds-example.conf.m4 $NGINX_DIR/includes/ds-example.conf | ||
sed -i -e 's/M4_PLATFORM/index/' $NGINX_DIR/includes/ds-example.conf | ||
sed -i -e 's/M4_DS_EXAMLE/\/snap\/onlyoffice-ds\/current\/var\/www\/onlyoffice\/documentserver\/server/' $NGINX_DIR/includes/ds-example.conf | ||
starter: | ||
plugin: dump | ||
|
@@ -296,8 +337,6 @@ parts: | |
ds-converter.conf: etc/supervisor/conf.d/ds-converter.conf | ||
ds-example.conf: etc/supervisor/conf.d/ds-example.conf | ||
ds.conf: etc/supervisor/conf.d/ds.conf | ||
ds.conf.tmpl: etc/onlyoffice/documentserver/nginx/ds.conf.tmpl | ||
ds-ssl.conf.tmpl: etc/onlyoffice/documentserver/nginx/ds-ssl.conf.tmpl | ||
|
||
bin: | ||
plugin: dump | ||
|