Feature/Add supervisor services (#517)
* Add supervisor services * Add installation of the DOCKER_INSTALLATION variable
This commit is contained in:
parent
784ecca724
commit
6c0c7085c9
@ -86,6 +86,7 @@ RUN PACKAGE_FILE="${COMPANY_NAME}-${PRODUCT_NAME}${PRODUCT_EDITION}${PACKAGE_VER
|
|||||||
wget -q -P /tmp "$PACKAGE_BASEURL/$PACKAGE_FILE" && \
|
wget -q -P /tmp "$PACKAGE_BASEURL/$PACKAGE_FILE" && \
|
||||||
apt-get -y update && \
|
apt-get -y update && \
|
||||||
service postgresql start && \
|
service postgresql start && \
|
||||||
|
export DOCKER_INSTALLATION=1 && \
|
||||||
apt-get -yq install /tmp/$PACKAGE_FILE && \
|
apt-get -yq install /tmp/$PACKAGE_FILE && \
|
||||||
service postgresql stop && \
|
service postgresql stop && \
|
||||||
service supervisor stop && \
|
service supervisor stop && \
|
||||||
|
13
config/supervisor/ds/ds-converter.conf
Normal file
13
config/supervisor/ds/ds-converter.conf
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[program:converter]
|
||||||
|
command=/var/www/COMPANY_NAME/documentserver/server/FileConverter/converter
|
||||||
|
directory=/var/www/COMPANY_NAME/documentserver/server/FileConverter
|
||||||
|
user=ds
|
||||||
|
environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/COMPANY_NAME/documentserver,NODE_DISABLE_COLORS=1,APPLICATION_NAME=COMPANY_NAME
|
||||||
|
stdout_logfile=/var/log/COMPANY_NAME/documentserver/converter/out.log
|
||||||
|
stdout_logfile_backups=0
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/var/log/COMPANY_NAME/documentserver/converter/err.log
|
||||||
|
stderr_logfile_backups=0
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
13
config/supervisor/ds/ds-docservice.conf
Normal file
13
config/supervisor/ds/ds-docservice.conf
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[program:docservice]
|
||||||
|
command=/var/www/COMPANY_NAME/documentserver/server/DocService/docservice
|
||||||
|
directory=/var/www/COMPANY_NAME/documentserver/server/DocService
|
||||||
|
user=ds
|
||||||
|
environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/COMPANY_NAME/documentserver,NODE_DISABLE_COLORS=1
|
||||||
|
stdout_logfile=/var/log/COMPANY_NAME/documentserver/docservice/out.log
|
||||||
|
stdout_logfile_backups=0
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/var/log/COMPANY_NAME/documentserver/docservice/err.log
|
||||||
|
stderr_logfile_backups=0
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
14
config/supervisor/ds/ds-example.conf
Normal file
14
config/supervisor/ds/ds-example.conf
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[program:example]
|
||||||
|
command=/var/www/COMPANY_NAME/documentserver-example/example
|
||||||
|
directory=/var/www/COMPANY_NAME/documentserver-example/
|
||||||
|
user=ds
|
||||||
|
environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/COMPANY_NAME/documentserver-example,NODE_DISABLE_COLORS=1
|
||||||
|
stdout_logfile=/var/log/COMPANY_NAME/documentserver-example/out.log
|
||||||
|
stdout_logfile_backups=0
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/var/log/COMPANY_NAME/documentserver-example/err.log
|
||||||
|
stderr_logfile_backups=0
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
autostart=false
|
||||||
|
autorestart=true
|
||||||
|
redirect_stderr=true
|
13
config/supervisor/ds/ds-metrics.conf
Normal file
13
config/supervisor/ds/ds-metrics.conf
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[program:metrics]
|
||||||
|
command=/var/www/COMPANY_NAME/documentserver/server/Metrics/metrics ./config/config.js
|
||||||
|
directory=/var/www/COMPANY_NAME/documentserver/server/Metrics
|
||||||
|
user=ds
|
||||||
|
environment=NODE_DISABLE_COLORS=1
|
||||||
|
stdout_logfile=/var/log/COMPANY_NAME/documentserver/metrics/out.log
|
||||||
|
stdout_logfile_backups=0
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/var/log/COMPANY_NAME/documentserver/metrics/err.log
|
||||||
|
stderr_logfile_backups=0
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
2
config/supervisor/ds/ds.conf
Normal file
2
config/supervisor/ds/ds.conf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[group:ds]
|
||||||
|
programs=docservice,converter,metrics,example
|
@ -496,6 +496,8 @@ update_supervisor_settings(){
|
|||||||
cp ${SYSCONF_TEMPLATES_DIR}/supervisor/supervisor /etc/init.d/
|
cp ${SYSCONF_TEMPLATES_DIR}/supervisor/supervisor /etc/init.d/
|
||||||
# Copy modified supervisor config
|
# Copy modified supervisor config
|
||||||
cp ${SYSCONF_TEMPLATES_DIR}/supervisor/supervisord.conf /etc/supervisor/supervisord.conf
|
cp ${SYSCONF_TEMPLATES_DIR}/supervisor/supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
|
sed "s/COMPANY_NAME/${COMPANY_NAME}/g" -i ${SYSCONF_TEMPLATES_DIR}/supervisor/ds/*.conf
|
||||||
|
cp ${SYSCONF_TEMPLATES_DIR}/supervisor/ds/*.conf etc/supervisor/conf.d/
|
||||||
}
|
}
|
||||||
|
|
||||||
update_log_settings(){
|
update_log_settings(){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user