[Unit] Description=PG36 reference API After=network-online.target Wants=network-online.target [Service] Type=simple User=pg36-api Group=pg36-api EnvironmentFile=/etc/pg36-api/runtime.env ExecStart=/opt/pg36-api/pg36-ch12-service Restart=on-failure RestartSec=2s TimeoutStopSec=5s KillSignal=SIGTERM NoNewPrivileges=true PrivateTmp=true ProtectSystem=strict ProtectHome=true ReadWritePaths=/var/lib/pg36-api # runtime.env is created by the deployment secret path, mode 0600: # PG36_DATABASE_URL=postgres://pg36_app@pg-demo:5433/pg36_shop?sslmode=verify-full # PG36_HTTP_ADDR=127.0.0.1:18012 # PG36_MAX_CONNS=8 # PG36_MIN_IDLE_CONNS=1 # # Never set PG36_ENABLE_FAULTS=1 outside an isolated lab deployment. [Install] WantedBy=multi-user.target