-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefacto2.service
More file actions
45 lines (42 loc) · 1.35 KB
/
defacto2.service
File metadata and controls
45 lines (42 loc) · 1.35 KB
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
42
43
44
45
# /etc/systemd/system/defacto2.service
#
# For using Defacto2 with a systemd unit file.
#
# Reload the systemd configuration and start the service:
# systemctl daemon-reload
#
# Enable the service to start on boot and start it:
# systemctl enable defacto2.service
#
# Star the service:
# systemctl start defacto2.service
#
# Check the status of the service and view the logs:
# systemctl status defacto2.service
# journalctl -e -u defacto2.service
#
# For more information on these commands, see:
# https://www.freedesktop.org/software/systemd/man/latest/systemd.directives.html
[Unit]
Description=Defacto2
Documentation=https://github.com/Defacto2/server
After=network.target network-online.target
Requires=network-online.target
[Service]
Environment="D2_DATABASE_URL=postgres://root:example@localhost:5432/defacto2_ps"
Environment="D2_DIR_DOWNLOAD=/mnt/volume/assets/downloads"
Environment="D2_DIR_PREVIEW=/mnt/volume/assets/images000"
Environment="D2_DIR_THUMBNAIL=/mnt/volume/assets/images400"
Environment="D2_DIR_EXTRA=/mnt/volume/assets/extras"
Environment="D2_DIR_ORPHANED=/mnt/volume/assets/orphaned"
Environment="D2_DIR_LOG=/var/log"
Environment="D2_PROD_MODE=true" "D2_READ_ONLY=true" "D2_NO_CRAWL=true"
User=caddy
Group=caddy
ExecStart=/usr/bin/defacto2-server
ProtectHome=true
ProtectSystem=full
PrivateTmp=yes
TimeoutStopSec=15s
[Install]
WantedBy=multi-user.target