Merge pull request #111 from agolybev/feature/ami

Add Dockerfile for AMI
This commit is contained in:
Alexey Bannov 2020-11-10 16:29:29 +03:00 committed by GitHub
commit d77c883787
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 28 additions and 0 deletions

28
Dockerfile.ami Normal file
View File

@ -0,0 +1,28 @@
FROM onlyoffice/communityserver:latest
ARG APPSETTING_CONFIG=/var/www/onlyoffice/WebStudio/web.appsettings.config
RUN apt-get -y update && \
apt-get install -yq xmlstarlet
RUN xmlstarlet ed -L \
-s "/appSettings" -t elem -n "add" \
-i "/appSettings/add[not(@*)]" -t attr -n "key" -v "fullTextSearch" \
-i "/appSettings/add[@key='fullTextSearch']" -t attr -n "value" -v "false" \
$APPSETTING_CONFIG && \
xmlstarlet ed -L \
-s "/appSettings" -t elem -n "add" \
-i "/appSettings/add[not(@*)]" -t attr -n "key" -v "web.ami.meta" \
-i "/appSettings/add[@key='web.ami.meta']" -t attr -n "value" -v "http://169.254.169.254/latest/meta-data/" \
$APPSETTING_CONFIG && \
xmlstarlet ed -L \
-d "/appSettings/add[@key='files.thirdparty.enable']" \
-s "/appSettings" -t elem -n "add" \
-i "/appSettings/add[not(@*)]" -t attr -n "key" -v "files.thirdparty.enable" \
-i "/appSettings/add[@key='files.thirdparty.enable']" -t attr -n "value" -v "box,dropboxv2,docusign,google,onedrive,nextcloud,owncloud,webdav,kdrive,yandex" \
$APPSETTING_CONFIG && \
xmlstarlet ed -L \
-d "/appSettings/add[@key='web.hide-settings']" \
-s "/appSettings" -t elem -n "add" \
-i "/appSettings/add[not(@*)]" -t attr -n "key" -v "web.hide-settings" \
-i "/appSettings/add[@key='web.hide-settings']" -t attr -n "value" -v "VersionSettings,Monitoring,PublicPortal,PortalRename,Migration,Promocode,TariffSettings,ProxyHttpContent,MailService,FullTextSearch,Storage,EncryptionSettings" \
$APPSETTING_CONFIG