116 lines
2.8 KiB
Plaintext
116 lines
2.8 KiB
Plaintext
init seafile {
|
|
application_groups [seafile]
|
|
}
|
|
|
|
application_group seafile {
|
|
applications [
|
|
setup
|
|
seafile
|
|
seahub
|
|
nginx
|
|
]
|
|
}
|
|
|
|
init seafile {
|
|
application_groups [seafile]
|
|
}
|
|
|
|
application_group seafile {
|
|
applications [
|
|
setup
|
|
seafile
|
|
seahub
|
|
nginx
|
|
]
|
|
}
|
|
|
|
application setup {
|
|
mode oneshot
|
|
start [ /usr/bin/setup ]
|
|
dir /opt/seafile
|
|
env {
|
|
new {
|
|
SEAF /opt/seafile
|
|
}
|
|
pass {
|
|
SEAF_UPGRADE_INTERVAL SEAF_UPGRADE_INTERVAL
|
|
SEAF_VERSION SEAF_VERSION
|
|
SEAF_NAME SEAF_NAME
|
|
SEAF_MYSQL SEAF_MYSQL
|
|
SEAF_MYSQL_HOST SEAF_MYSQL_HOST
|
|
SEAF_MYSQL_PORT SEAF_MYSQL_PORT
|
|
SEAF_MYSQL_USER SEAF_MYSQL_USER
|
|
SEAF_MYSQL_DB_SEAF SEAF_MYSQL_DB_SEAF
|
|
SEAF_MYSQL_DB_HUB SEAF_MYSQL_DB_HUB
|
|
SEAF_MYSQL_DB_CCNET SEAF_MYSQL_DB_CCNET
|
|
}
|
|
}
|
|
}
|
|
|
|
application seafile {
|
|
mode forking
|
|
pidfile /var/run/seafile/seaf-server.pid
|
|
requires [ setup ]
|
|
start [ /usr/bin/seafile, start ]
|
|
stop [ /usr/bin/seafile, stop ]
|
|
dir /opt/seafile
|
|
healthcheck [ server ]
|
|
healthcheckfail restart
|
|
}
|
|
|
|
application seahub {
|
|
mode forking
|
|
requires [ setup, seafile ]
|
|
pidfile /var/run/seafile/seahub.pid
|
|
start [ /usr/bin/seahub, start, 8000 ]
|
|
stop [ /usr/bin/seahub, stop ]
|
|
dir /opt/seafile
|
|
healthcheck [ hub ]
|
|
healthcheckfail restart
|
|
}
|
|
|
|
application nginx {
|
|
mode forking
|
|
pidfile /var/run/nginx.pid
|
|
requires [ setup, seahub ]
|
|
start [ /usr/sbin/nginx ]
|
|
dir /opt/seafile
|
|
healthcheck [ http, hub ]
|
|
healthcheckfail restart
|
|
}
|
|
|
|
healthchecks riffol {
|
|
checks [
|
|
proc://riffol
|
|
]
|
|
timeout 2
|
|
interval 1000
|
|
}
|
|
|
|
healthcheck http {
|
|
checks [
|
|
tcp://127.0.0.1:80
|
|
]
|
|
interval 30
|
|
timeout 20
|
|
}
|
|
|
|
healthcheck hub {
|
|
checks [
|
|
tcp://127.0.0.1:8000
|
|
tcp://127.0.0.1:8080
|
|
]
|
|
interval 80
|
|
timeout 60
|
|
}
|
|
|
|
healthcheck server {
|
|
checks [
|
|
tcp://127.0.0.1:8082
|
|
proc://ccnet-server
|
|
proc://seaf-server
|
|
]
|
|
interval 10
|
|
timeout 5
|
|
}
|