diff --git a/.env b/.env new file mode 100644 index 0000000..c9b21fd --- /dev/null +++ b/.env @@ -0,0 +1,3 @@ +REPO=onlyoffice4ami +STATUS='' +TAG=latest diff --git a/Dockerfile.alc b/Dockerfile.alc deleted file mode 100644 index 66c4bb4..0000000 --- a/Dockerfile.alc +++ /dev/null @@ -1,8 +0,0 @@ -FROM onlyoffice4ami/communityserver:latest -ARG APPSETTING_CONFIG=/var/www/onlyoffice/WebStudio/web.appsettings.config - -RUN 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://100.100.100.200/latest/meta-data/" \ - $APPSETTING_CONFIG diff --git a/Dockerfile.ami b/Dockerfile.ami index 0e149ce..086af36 100644 --- a/Dockerfile.ami +++ b/Dockerfile.ami @@ -1,4 +1,4 @@ -FROM onlyoffice/communityserver:latest +FROM onlyoffice/communityserver:latest AS communityserver-ami ARG APPSETTING_CONFIG=/var/www/onlyoffice/WebStudio/web.appsettings.config RUN apt-get -y update && \ @@ -26,3 +26,12 @@ RUN xmlstarlet ed -L \ -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 + +FROM communityserver-ami AS communityserver-alc +ARG APPSETTING_CONFIG=/var/www/onlyoffice/WebStudio/web.appsettings.config + +RUN 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://100.100.100.200/latest/meta-data/" \ + $APPSETTING_CONFIG diff --git a/build.yml b/build.yml new file mode 100644 index 0000000..a5f1402 --- /dev/null +++ b/build.yml @@ -0,0 +1,16 @@ +version: "3.6" + +services: + onlyoffice-communityserver-ami: + build: + context: ./ + dockerfile: Dockerfile.ami + target: communityserver-ami + image: "${REPO}/${STATUS}communityserver:${TAG}" + + onlyoffice-communityserver-alc: + build: + context: ./ + dockerfile: Dockerfile.ami + target: communityserver-alc + image: "${REPO}/${STATUS}communityserver:${TAG}-alc" diff --git a/hooks/build b/hooks/build new file mode 100644 index 0000000..95ccaa9 --- /dev/null +++ b/hooks/build @@ -0,0 +1,3 @@ +#!/bin/bash +export TAG=$DOCKER_TAG +docker-compose -f ${BUILD_FILE}.yml build diff --git a/hooks/push b/hooks/push new file mode 100644 index 0000000..2e3021f --- /dev/null +++ b/hooks/push @@ -0,0 +1,3 @@ +#!/bin/bash +export TAG=$DOCKER_TAG +docker-compose -f ${BUILD_FILE}.yml push