Discourse Amazon SNS 알림

:information_source: Summary Send push notifications via Amazon SNS to a custom mobile application.
:hammer_and_wrench: Repository Link GitHub - discourse/discourse-amazon-sns · GitHub
:open_book: Install Guide How to install plugins in Discourse

The discourse-amazon-sns plugin enables push notifications in Discourse forums through Amazon Simple Notification Service (SNS). It’s designed to work in conjunction with a mobile app to deliver push notifications to iOS and Android devices via APNS and GCM/FCM. Amazon SNS handles the communication with each protocol, this plugin ensures that Discourse events (replies, watched topics, PMs, etc.) trigger events in SNS.

Features

  • Push notification support for both iOS (APNS) and Android (GCM/FCM) platforms
  • Device token registration and management
  • Automatic handling of disabled or invalid endpoints
  • Integration with Discourse’s existing notification system
  • Support for React Native webview communication

Requirements

  • AWS account with SNS access
  • Amazon SNS platform applications configured for:
    • iOS (APNS or APNS_SANDBOX)
    • Android (GCM/FCM)
  • AWS credentials with permissions to publish to SNS
  • Mobile application that can register for and receive push notifications

Settings

Name Description
enable_amazon_sns_pns Enable/disable the plugin functionality
amazon_sns_access_key_id AWS access key ID
amazon_sns_secret_access_key AWS secret access key
amazon_sns_region AWS region (e.g., us-east-1)
amazon_sns_apns_application_arn ARN for the iOS platform application in SNS
amazon_sns_gcm_application_arn ARN for the Android platform application in SNS
5개의 좋아요

안녕하세요 여러분! discourse/discourse 이미지를 사용한 Discourse 3.5.2를 사용 중인데, 설치 과정에서 문제가 발생하는 플러그인은 이것뿐이며, 이로 인해 설치 시 5xx 오류가 발생합니다. 오류 내용은 다음과 같습니다:

ActionView::Template::Error (The asset 'plugins/discourse-amazon-sns.js' was not found in the load path.)
lib/freedom_patches/propshaft_patches.rb:16:in `compute_asset_path'
app/helpers/application_helper.rb:97:in `script_asset_path'
app/helpers/application_helper.rb:147:in `block in preload_script'
app/helpers/application_helper.rb:146:in `map'
app/helpers/application_helper.rb:146:in `preload_script'
app/views/layouts/application.html.erb:36
app/views/layouts/application.html.erb:35:in `each'
app/views/layouts/application.html.erb:35
lib/topic_list_responder.rb:16:in `block (2 levels) in respond_with_list'
lib/topic_list_responder.rb:7:in `respond_with_list'
app/controllers/list_controller.rb:115:in `block (2 levels) in <class:ListController>'
app/controllers/application_controller.rb:433:in `block in with_resolved_locale'
app/controllers/application_controller.rb:433:in `with_resolved_locale'
app/controllers/application_controller.rb:1065:in `ensure_dont_cache_page'
lib/middleware/omniauth_bypass_middleware.rb:35:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:415:in `call'
lib/middleware/csp_script_nonce_injector.rb:12:in `call'
config/initializers/008-rack-cors.rb:14:in `call'
lib/middleware/default_headers.rb:13:in `call'
config/initializers/100-quiet_logger.rb:20:in `call'
config/initializers/100-silence_logger.rb:29:in `call'
lib/middleware/enforce_hostname.rb:23:in `call'
lib/middleware/processing_request.rb:12:in `call'
lib/middleware/request_tracker.rb:410:in `call'

다음 명령어를 실행하여 모든 에셋을 이미 사전 컴파일했습니다:

RAILS_ENV=production bundle exec rake assets:precompile

이 문제의 원인이 무엇일 수 있는지 이해하는 데 도움을 주실 수 있을까요?

죄송합니다. 새로운 오류인가요? 즉, 이미 이 플러그인이 설치되어 있었는데 나중에 작동이 멈춘 건가요?

새로운 기능인데, 저희 설치 환경에 이 플러그인을 방금 추가했습니다 (다른 플러그인들은 모두 정상 작동합니다). 그런데 사이트가 5xx 오류를 반환하고, 로그를 확인해보니 보내드린 내용과 같은 것이 표시됩니다. 제 Dockerfile은 다음과 같은 형태입니다:

FROM discourse/discourse:3.5.2

WORKDIR /var/www/discourse

# Install discourse-amazon-sns plugin
RUN git clone https://github.com/discourse/discourse-amazon-sns.git /var/www/discourse/plugins/discourse-amazon-sns && \
    chown -R discourse:discourse /var/www/discourse/plugins/discourse-amazon-sns

EXPOSE 80

해당 이미지는 실험적 버전이며, 플러그인과의 호환성 문제가 많이 발생할 수 있습니다.

2개의 좋아요

네, @caue-pareto, 죄송합니다. 이 문제는 해당 이미지와 관련이 있는 것 같습니다. 표준 설치 절차를 따랐을 때, 제 자체 호스팅 환경에서는 이 플러그인에 문제가 없습니다.

1개의 좋아요