Docker-DocumentServer/Dockerfile.production
Danil Titarenko 207bd5dac7
Add build Documentserver without example (#473)
* Add dockerfile for non-example build

* Create new symlink for supervisor config

* Add ARG for dynamic images specification

* Update action version

* Add build nonexample after stable build success

* Add targets for nonexample build

* Cosmetic changes

* Update FROM instruction

* Add default tag

* Remove needless welcome nginx location

* Change nonexample image tags

* Set correct nonexample image tag

* Change tag for nonexample image

* Change dockerfile name

* Rename dockerfile for release images

* Move stable build to dockerfile

* Refactoring bake file
2022-08-29 11:40:25 +03:00

25 lines
819 B
Docker

### Arguments avavlivable only for FROM instruction ###
ARG TAG=latest
ARG COMPANY_NAME=onlyoffice
ARG PRODUCT_EDITION=
### Build main-release ###
FROM ${COMPANY_NAME}/4testing-documentserver${PRODUCT_EDITION}:${TAG} as documentserver-stable
### Build nonexample ###
FROM ${COMPANY_NAME}/documentserver${PRODUCT_EDITION}:${TAG} as documentserver-nonexample
ARG COMPANY_NAME=onlyoffice
ARG PRODUCT_NAME=documentserver
ARG DS_SUPERVISOR_CONF=/etc/supervisor/conf.d/ds.conf
### Remove all documentserver-example data ###
RUN rm -rf /var/www/$COMPANY_NAME/$PRODUCT_NAME-example \
&& rm -rf /etc/$COMPANY_NAME/$PRODUCT_NAME-example \
&& rm -f $DS_SUPERVISOR_CONF \
&& rm -f /etc/nginx/includes/ds-example.conf \
&& ln -s /etc/$COMPANY_NAME/$PRODUCT_NAME/supervisor/ds.conf $DS_SUPERVISOR_CONF