open-wether / build /openmeteo-api.service
soiz1's picture
Migrated from GitHub
6ee917b verified
raw
history blame contribute delete
606 Bytes
[Unit]
Description = Run Open-Meteo API
StartLimitIntervalSec=0
[Service]
EnvironmentFile=/etc/default/openmeteo-api.env
PassEnvironment=VAPOR_ENV API_SYNC_APIKEYS NGINX_SENDFILE_PREFIX LOG_LEVEL CACHE_DIRECTORY SWIFT_BACKTRACE
Type=simple
User=openmeteo-api
Group=openmeteo-api
WorkingDirectory=/var/lib/openmeteo-api/
ExecStart=/usr/local/bin/openmeteo-api serve -b $API_BIND --env $VAPOR_ENV
ExecStopPost=/bin/bash -c 'if [ "$$EXIT_STATUS" != 0 ]; then /usr/local/bin/openmeteo-notify.sh $NOTIFICATION_EMAIL %N; fi'
Restart=always
RestartSec=1
LimitNOFILE=infinity
[Install]
WantedBy = default.target