103 lines
1.8 KiB
Plaintext
103 lines
1.8 KiB
Plaintext
init seafile {
|
|
application_groups [ "applicationgroup.seafile" ]
|
|
}
|
|
|
|
application_group seafile {
|
|
applications [
|
|
"application.setup"
|
|
"application.seahub"
|
|
"application.seafile"
|
|
"application.nginx"
|
|
]
|
|
|
|
application "setup" {
|
|
mode oneshot
|
|
start [ /usr/bin/setup ]
|
|
pidfile /var/run/setup.pid
|
|
dir /opt/seafile
|
|
env {
|
|
pass SEAF_VERSION SEAF_VERSION
|
|
pass SEAF_UPGRADE_INTERVAL SEAF_UPGRADE_INTERVAL
|
|
}
|
|
stdout file [ /dev/stdout ]
|
|
stderr file [ /dev/stderr ]
|
|
uid 0
|
|
gid 0
|
|
}
|
|
|
|
application "nginx" {
|
|
mode oneshot
|
|
start [ /usr/sbin/nginx ]
|
|
requires [ setup seahub ]
|
|
pidfile /var/run/nginx/nginx.pid
|
|
dir /opt/seafile
|
|
stdout file [ /dev/log ]
|
|
stderr file [ /dev/stderr ]
|
|
uid 0
|
|
gid 0
|
|
healthchecks [
|
|
"healthcheck.http"
|
|
]
|
|
healthcheckfail restart
|
|
}
|
|
|
|
application "seafile" {
|
|
mode forking
|
|
requires [ setup ]
|
|
start [ /usr/bin/seafile, start ]
|
|
stop [ /usr/bin/seafile, stop ]
|
|
pidfile /var/run/seafile/seafile.pid
|
|
dir /opt/seafile
|
|
stdout file [ /dev/stdout ]
|
|
stderr file [ /dev/stderr ]
|
|
uid 0
|
|
gid 0
|
|
healthchecks [
|
|
"healthcheck.server"
|
|
]
|
|
healthcheckfail restart
|
|
}
|
|
|
|
application seahub" {
|
|
mode forking
|
|
requires [ setup ]
|
|
start [ /usr/bin/seahub, start, 8000 ]
|
|
stop [ /usr/bin/seahub, stop ]
|
|
pidfile /var/run/seafile/seahub.pid
|
|
dir /opt/seafile
|
|
stdout file [ /dev/stdout ]
|
|
stderr file [ /dev/stderr ]
|
|
uid 0
|
|
gid 0
|
|
healthchecks [
|
|
"healthcheck.hub"
|
|
]
|
|
healthcheckfail restart
|
|
}
|
|
|
|
|
|
healthcheck http {
|
|
checks [
|
|
"http://127.0.0.1:80"
|
|
]
|
|
interval 15
|
|
timeout 20
|
|
}
|
|
|
|
healthcheck hub {
|
|
checks [
|
|
"http://127.0.0.1:8000"
|
|
"tcp://127.0.0.1:8080",
|
|
]
|
|
interval 15
|
|
timeout 60
|
|
}
|
|
|
|
healthcheck server {
|
|
checks [
|
|
"http://127.0.0.1:8082"
|
|
]
|
|
interval 15
|
|
timeout 15
|
|
}
|