Deployment¶
Evidence in the repository¶
The repository supplies:
- a systemd unit targeting
/opt/postgis-service/postgis-service; - an environment-file example at
/etc/postgis-service.env; - an Apache SSL-virtual-host fragment;
- a shell build script.
It does not supply a container image, Compose file, Kubernetes manifests, package, firewall rules, TLS certificates, load-balancer checks, backup retention, log rotation, or infrastructure automation.
systemd¶
The supplied unit:
[Service]
Type=simple
WorkingDirectory=/opt/postgis-service
EnvironmentFile=-/etc/postgis-service.env
ExecStart=/opt/postgis-service/postgis-service
Restart=always
RestartSec=5
The leading - makes a missing environment file non-fatal to systemd, although the process will fail without usable database DSNs. The unit has no explicit service user, hardening, resource limits, shutdown timeout, or writable-directory declarations. Define these according to the target host; the source does not establish correct ownership values.
Apache reverse proxy¶
Enable the modules named by the example:
Place the WebSocket proxy before the HTTP prefix proxy:
ProxyPass /postgis-service/api/terminal/ws/ ws://127.0.0.1:8090/postgis-service/api/terminal/ws/
ProxyPassReverse /postgis-service/api/terminal/ws/ ws://127.0.0.1:8090/postgis-service/api/terminal/ws/
ProxyPass /postgis-service/ http://127.0.0.1:8090/postgis-service/
ProxyPassReverse /postgis-service/ http://127.0.0.1:8090/postgis-service/
<Location /postgis-service>
RequestHeader set X-Forwarded-Prefix "/postgis-service"
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Host "%{HTTP_HOST}e"
</Location>
The supplied file also documents a prefix-stripping variant. Keep the service bound to a trusted network because forwarded headers are accepted from any direct client.
Files and permissions¶
The process needs:
- read access to
web/; - read/write access below
POSTGIS_BACKUP_DIRandPOSTGIS_IMPORT_DIR; - read/write access to configured
pg_hba.confand its parent for timestamped backups; - permission to execute runtime tools;
- permission to read
journalctl -u postgresql; - permission to run allowed PostgreSQL
systemctlactions if server terminal controls must work.
The source does not configure privilege escalation. Whether systemctl restart postgresql works depends entirely on the service identity and host policy.
Database privileges¶
Metadata credentials need create/alter table and normal DML privileges for the five metadata tables. Auth credentials need reads from Central user/session/group/ACL tables and can upsert platform resources and permissions at startup. Managed-server credentials perform database creation/drop, session termination, extension creation, role/privilege changes, ALTER SYSTEM, and config reload. Exact minimum PostgreSQL role grants are not documented or enforced; a highly privileged administrator is assumed by implemented operations.
Operations¶
- Logs go through Go's standard logger to stdout/stderr and therefore to journald under the supplied unit.
- Logs include startup, auth/store failures, worker lifecycle, job failures, and terminal audit events. No structured JSON format, level control, file sink, metrics, tracing, or request access log is implemented.
- Backup retention and import-file cleanup are not implemented.
- Running jobs are requeued after any restart, regardless of age. This can repeat non-idempotent external operations.
- There is no health endpoint. Use process state plus an authenticated API request and dependency checks.
- The HTTP server has no explicit read/write/idle timeouts or graceful shutdown.
See Installation, Configuration, and Troubleshooting.