-
Notifications
You must be signed in to change notification settings - Fork 5
/
dawis.example.service
41 lines (36 loc) · 1.24 KB
/
dawis.example.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
[Unit]
Description=dawis [project]
After=network.target
[Service]
Type=forking
User=dawis
Group=dawis
EnvironmentFile=/opt/dawis/projects/[project]/dawis.example.service.env
WorkingDirectory=/opt/dawis/projects/[project]
ExecStart=/bin/sh -c '\
${CELERY_PIPENV_RUN} multi start ${CELERY_NODES} \
-A ${CELERY_APP} -B \
--schedule=${CELERY_BEAT_SCHEDULEFILE_PATH}/${CELERY_PROJECT}-schedule.db \
--pidfile=${CELERY_PIDFILE_PATH}/${CELERY_PROJECT}-%n.pid \
--logfile=${CELERY_LOGFILE_PATH}/${CELERY_PROJECT}/%n%I.log \
--loglevel=${CELERY_LOGLEVEL} \
--time-limit=${CELERY_TIME_LIMIT} \
--concurrency=${CELERY_CONCURRENCY} \
'
ExecStop=/bin/sh -c '\
${CELERY_PIPENV_RUN} multi stop ${CELERY_NODES} \
--pidfile=${CELERY_PIDFILE_PATH}/${CELERY_PROJECT}-%n.pid \
--logfile=${CELERY_LOGFILE_PATH}/${CELERY_PROJECT}/%n%I.log \
'
ExecReload=/bin/sh -c '\
${CELERY_PIPENV_RUN} multi restart ${CELERY_NODES} \
-A ${CELERY_APP} -B \
--schedule=${CELERY_BEAT_SCHEDULEFILE_PATH}/${CELERY_PROJECT}-schedule.db \
--pidfile=${CELERY_PIDFILE_PATH}/${CELERY_PROJECT}-%n.pid \
--logfile=${CELERY_LOGFILE_PATH}/${CELERY_PROJECT}/%n%I.log \
--loglevel=${CELERY_LOGLEVEL} \
--time-limit=${CELERY_TIME_LIMIT} \
--concurrency=${CELERY_CONCURRENCY} \
'
[Install]
WantedBy=multi-user.target