-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtimeline.service
More file actions
59 lines (49 loc) · 1.28 KB
/
timeline.service
File metadata and controls
59 lines (49 loc) · 1.28 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
[Unit]
Description=Life Timeline Swoole Application
After=network.target
Wants=network-online.target
[Service]
Type=simple
User=www-data
Group=www-data
WorkingDirectory=/opt/php-timeline
# Environment
Environment="XDEBUG_MODE=off"
Environment="APP_ENV=production"
# Start via composer script (uses laminas mezzio:swoole:start)
ExecStart=/usr/bin/php /opt/php-timeline/vendor/bin/laminas mezzio:swoole:start
ExecStop=/usr/bin/php /opt/php-timeline/vendor/bin/laminas mezzio:swoole:stop
ExecReload=/usr/bin/php /opt/php-timeline/vendor/bin/laminas mezzio:swoole:reload
# Restart policy
Restart=always
RestartSec=5
StartLimitInterval=60
StartLimitBurst=3
# Logging
StandardOutput=journal
StandardError=journal
SyslogIdentifier=timeline
# Security hardening
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
RestrictNamespaces=true
RestrictRealtime=true
RestrictSUIDSGID=true
LockPersonality=true
MemoryDenyWriteExecute=false
RemoveIPC=true
# Writable paths for SQLite database and PID file
ReadWritePaths=/opt/php-timeline/data
# Process limits
LimitNOFILE=65535
LimitNPROC=4096
# Capabilities
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=
[Install]
WantedBy=multi-user.target