-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobelix-mmda-backend.service
39 lines (35 loc) · 1.23 KB
/
obelix-mmda-backend.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
# I'm a systemd service file that lives in /etc/systemd/system/
[Unit]
Description=Daemon for MMDA Backend
After=docker.service
Wants=
Requires=docker.service
[Service]
Restart=on-failure
StartLimitInterval=20
StartLimitBurst=5
TimeoutStartSec=0
RestartSec=5
Environment="HOME=/root"
SyslogIdentifier=docker-mmda-backend
ExecStartPre=-/usr/bin/docker kill mmda-backend
ExecStartPre=-/usr/bin/docker rm mmda-backend
ExecStart=/usr/bin/docker run \
-v /data/Philipp/mmda/:/opt/mmda/ \
-v /data/Philipp/mmda/mmda-corpora.py:/opt/mmda-corpora.py:ro \
-v /data/corpora/cqpweb/registry/:/opt/cwb/registry/:ro \
-v /data/corpora/cqpweb/corpora/:/data/corpora/cqpweb/corpora/:ro \
-v /cip/corpora/projects/EFE/embeddings/:/opt/embeddings/:ro \
-v /etc/letsencrypt/:/certs/letsencrypt/:ro \
-e TLS_ENABLE=true \
-e TLS_CERTFILE=/certs/letsencrypt/live/corpora.linguistik.uni-erlangen.de/fullchain.pem \
-e TLS_KEYFILE=/certs/letsencrypt/live/corpora.linguistik.uni-erlangen.de/privkey.pem \
-e SECRET_KEY=fLVmrrpwjjHfdshvsrewqlbpuvcsewhrsdfweh \
-e WORKERS=16 \
-p 5000:5000 \
--name mmda-backend \
mmda-backend:latest
ExecStop=-/usr/bin/docker stop --time=0 mmda-backend
ExecStop=-/usr/bin/docker rm mmda-backend
[Install]
WantedBy=multi-user.target