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

29 lines
906 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
Environment=RPC_URL=https://rpc-http-pub.d-bis.org
Environment=TOKEN_AGGREGATION_BASE_URL=http://127.0.0.1:3000
Environment=BLOCKSCOUT_INTERNAL_URL=http://127.0.0.1:4000
Environment=EXPLORER_PUBLIC_BASE=https://explorer.d-bis.org
Environment=OPERATOR_SCRIPTS_ROOT=/opt/explorer/scripts
Environment=OPERATOR_SCRIPT_ALLOWLIST=check-health.sh,check-bridges.sh
Environment=OPERATOR_SCRIPT_TIMEOUT_SEC=120
ExecStart=/opt/explorer/bin/api-server
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target