Files
explorer-monorepo/deployment/common/systemd-api-service.example

22 lines
505 B
Plaintext
Raw Normal View History

# Example systemd unit for a REST API (e.g. explorer API on port 8080)
# Copy to /etc/systemd/system/explorer-api.service and adjust paths/env.
[Unit]
Description=Explorer REST API
After=network.target postgresql.service
[Service]
Type=simple
User=explorer
WorkingDirectory=/opt/explorer
Environment=PORT=8080
Environment=DB_HOST=localhost
Environment=DB_NAME=explorer
Environment=CHAIN_ID=138
ExecStart=/opt/explorer/bin/api-server
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target