Skip to content

emoy webhook (Emoji notify webhook) notify when new emoji is add

License

Notifications You must be signed in to change notification settings

sue445/emoy_webhook

Repository files navigation

emoy_webhook

emoy webhook (Emoji notify webhook) notify when new emoji is add

test docker-ghcr docker-gcp Maintainability Coverage Status

Example

example

Requirements

Getting started

Docker

This application is provided as a Docker image, so you can run it wherever you like.

Images

  • GitHub Container Registry (Recommended)
    • ghcr.io/sue445/emoy_webhook:latest: Use latest version
    • ghcr.io/sue445/emoy_webhook:X.Y.Z: Use specified version
  • Google Artifact Registry: If you want to run this app on Cloud Run, use this image
    • asia-docker.pkg.dev/emoy-webhook/emoy-webhook/app:latest: Use latest version
    • asia-docker.pkg.dev/emoy-webhook/emoy-webhook/app:X.Y.Z: Use specified version
    • asia-docker.pkg.dev/emoy-webhook/emoy-webhook/app:edge: The contents of the main branch are pushed to this tag

Available environment variables

  • SLACK_WEBHOOK_URL (Required) : Incoming Webhook URL
  • PUMA_THREADS_MIN : Puma minimum threads count. default is 0
  • PUMA_THREADS_MAX : Puma minimum threads count. default is 1 (to prevent duplicate posts to Slack)
  • PUMA_WORKERS : Puma workers count. default is 0 (to prevent duplicate posts to Slack)
  • PUMA_PORT : Puma port. default is 8080
  • DEBUG_LOGGING : If true is set, debug logs are output
  • SENTRY_DSN : Sentry DSN. This variable is optional. If you want to use Sentry, please set DSN
  • REDIS_URL : Redis URLfor notification caching (e.g. redis://path-to-redis:6379). See following section for details
  • FIRESTORE_COLLECTION : Firestore collection name for notification caching (e.g. emoy_webhook_cache). See following section for details

Notification caching

emoy_webhook has the following notification caching mechanism. These are optional, but it is recommended to set one of them

Redis

Set cache to Redis. If you use this, set REDIS_URL environment variable.

Firestore

Set cache to Firestore. If you use this, set FIRESTORE_COLLECTION environment variable.

To automatically delete the saved cache, please do the following.

gcloud
gcloud firestore fields ttls update expires_at --collection-group=${FIRESTORE_COLLECTION} --enable-ttl --async

c.f. https://cloud.google.com/firestore/docs/ttl#gcloud

Terraform

See. examples/gcp_cloud_run_terraform/firestore.tf

Heroku

This application was offered as a Heroku application, but since Heroku is ending its free plan, I have made it possible to run it outside of Heroku.

So this app can run outside of Heroku.

If you want to run this app on Heroku, browse heroku branch and click "Deploy to Heroku" button.

About

emoy webhook (Emoji notify webhook) notify when new emoji is add

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •