Server: basic implementation. Not tested => no python installed; bugfix in ESP (uvicorn on port 8090)
This commit is contained in:
1 parent
3694cdf207
commit
8a51e3d95e
38 files changed
+2442
-21
No files matched your search
@@ -0,0 +1,44 @@
|
||||
[Unit]
|
||||
Description=poorBird API
|
||||
After=network-online.target postgresql.service
|
||||
Wants=network-online.target
|
||||
Requires=postgresql.service
|
||||
|
||||
[Service]
|
||||
Type=exec
|
||||
User=poorbird
|
||||
Group=poorbird
|
||||
WorkingDirectory=/opt/poorbird/app
|
||||
EnvironmentFile=/etc/poorbird/poorbird.env
|
||||
|
||||
# Migrations run as a separate idempotent command, never at app import time.
|
||||
# Same command a container entrypoint or init job would call.
|
||||
ExecStartPre=/opt/poorbird/venv/bin/poorbird migrate
|
||||
ExecStart=/opt/poorbird/venv/bin/poorbird serve
|
||||
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
TimeoutStopSec=20
|
||||
|
||||
# Logs go to stdout and journald picks them up. No app-managed log files.
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=poorbird-api
|
||||
|
||||
# --- hardening
|
||||
NoNewPrivileges=yes
|
||||
PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
ProtectSystem=strict
|
||||
ProtectHome=yes
|
||||
ProtectKernelTunables=yes
|
||||
ProtectKernelModules=yes
|
||||
ProtectControlGroups=yes
|
||||
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
||||
RestrictSUIDSGID=yes
|
||||
LockPersonality=yes
|
||||
MemoryDenyWriteExecute=no
|
||||
ReadWritePaths=/srv/poorbird /var/lib/poorbird
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in new issue
Block a user