Discourse Amazon SNS 알림

:information_source: 요약 Amazon SNS를 통해 맞춤형 모바일 애플리케이션에 푸시 알림을 전송합니다.
:hammer_and_wrench: 저장소 링크 GitHub - discourse/discourse-amazon-sns · GitHub
:open_book: 설치 가이드 Discourse에서 플러그인 설치하는 방법

discourse-amazon-sns 플러그인은 Amazon Simple Notification Service(SNS)를 통해 Discourse 포럼에서 푸시 알림을 활성화합니다. 이 플러그인은 모바일 앱과 함께 작동하도록 설계되어 APNS 및 GCM/FCM을 통해 iOS 및 Android 기기에 푸시 알림을 전달합니다. Amazon SNS는 각 프로토콜과의 통신을 처리하며, 이 플러그인은 Discourse 이벤트(답글, 관찰 중인 주제, 개인 메시지 등)가 SNS에서 이벤트를 트리거하도록 보장합니다.

기능

  • iOS(APNS) 및 Android(GCM/FCM) 플랫폼 모두에 대한 푸시 알림 지원
  • 디바이스 토큰 등록 및 관리
  • 비활성화되거나 잘못된 엔드포인트에 대한 자동 처리
  • Discourse의 기존 알림 시스템과의 통합
  • React Native 웹뷰 통신 지원

요구 사항

  • SNS 접근 권한이 있는 AWS 계정
  • 다음 항목에 대해 구성된 Amazon SNS 플랫폼 애플리케이션:
    • iOS(APNS 또는 APNS_SANDBOX)
    • Android(GCM/FCM)
  • SNS에 게시할 수 있는 권한이 있는 AWS 자격 증명
  • 푸시 알림을 등록하고 수신할 수 있는 모바일 애플리케이션

설정

이름 설명
enable_amazon_sns_pns 플러그인 기능 활성화/비활성화
amazon_sns_access_key_id AWS 액세스 키 ID
amazon_sns_secret_access_key AWS 시크릿 액세스 키
amazon_sns_region AWS 리전(예: us-east-1)
amazon_sns_apns_application_arn SNS의 iOS 플랫폼 애플리케이션 ARN
amazon_sns_gcm_application_arn SNS의 Android 플랫폼 애플리케이션 ARN
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개의 좋아요