mirror of
https://github.com/christianselig/apollo-backend
synced 2024-12-26 08:15:27 +00:00
simplify architecture
This commit is contained in:
parent
bf84f75be4
commit
6310d51eae
1 changed files with 3 additions and 89 deletions
92
render.yaml
92
render.yaml
|
@ -89,107 +89,21 @@ services:
|
|||
buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo
|
||||
startCommand: panic-monitor ./apollo api
|
||||
|
||||
# Notifications
|
||||
# Worker
|
||||
- type: worker
|
||||
name: worker.notifications
|
||||
name: worker
|
||||
env: go
|
||||
plan: starter
|
||||
envVars:
|
||||
- fromGroup: env-settings
|
||||
- key: BUGSNAG_APP_TYPE
|
||||
value: worker
|
||||
- key: BUGSNAG_METADATA_QUEUE
|
||||
value: notifications
|
||||
scaling:
|
||||
minInstances: 10
|
||||
maxInstances: 30
|
||||
targetCPUPercent: 80
|
||||
buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo
|
||||
startCommand: panic-monitor ./apollo worker --queue NotificationCheckJob --consumers 256
|
||||
|
||||
# Stuck Notifications Checker
|
||||
- type: worker
|
||||
name: worker.notifications.stuck
|
||||
env: go
|
||||
plan: starter
|
||||
envVars:
|
||||
- fromGroup: env-settings
|
||||
- key: BUGSNAG_APP_TYPE
|
||||
value: worker
|
||||
- key: BUGSNAG_METADATA_QUEUE
|
||||
value: stuck
|
||||
scaling:
|
||||
minInstances: 2
|
||||
maxInstances: 10
|
||||
targetCPUPercent: 80
|
||||
buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo
|
||||
startCommand: panic-monitor ./apollo worker --queue StuckNotificationsJob --consumers 64
|
||||
|
||||
# Scheduler
|
||||
- type: worker
|
||||
name: app.scheduler
|
||||
env: go
|
||||
plan: starter
|
||||
envVars:
|
||||
- fromGroup: env-settings
|
||||
- key: BUGSNAG_APP_TYPE
|
||||
value: scheduler
|
||||
buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo
|
||||
startCommand: panic-monitor ./apollo scheduler
|
||||
|
||||
# Subreddit Watcher
|
||||
- type: worker
|
||||
name: worker.watcher.subreddits
|
||||
env: go
|
||||
plan: standard
|
||||
envVars:
|
||||
- fromGroup: env-settings
|
||||
- key: BUGSNAG_APP_TYPE
|
||||
value: worker
|
||||
- key: BUGSNAG_METADATA_QUEUE
|
||||
value: subreddits
|
||||
scaling:
|
||||
minInstances: 2
|
||||
maxInstances: 10
|
||||
targetCPUPercent: 80
|
||||
buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo
|
||||
startCommand: panic-monitor ./apollo worker --queue SubredditWatcherJob
|
||||
|
||||
# Trending Posts Watcher
|
||||
- type: worker
|
||||
name: worker.watcher.trending
|
||||
env: go
|
||||
plan: starter
|
||||
envVars:
|
||||
- fromGroup: env-settings
|
||||
- key: BUGSNAG_APP_TYPE
|
||||
value: worker
|
||||
- key: BUGSNAG_METADATA_QUEUE
|
||||
value: trending
|
||||
scaling:
|
||||
minInstances: 2
|
||||
maxInstances: 10
|
||||
targetCPUPercent: 80
|
||||
buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo
|
||||
startCommand: panic-monitor ./apollo worker --queue SubredditTrendingJob
|
||||
|
||||
# Live Activities
|
||||
- type: worker
|
||||
name: worker.live-activities
|
||||
env: go
|
||||
plan: starter
|
||||
envVars:
|
||||
- fromGroup: env-settings
|
||||
- key: BUGSNAG_APP_TYPE
|
||||
value: worker
|
||||
- key: BUGSNAG_METADATA_QUEUE
|
||||
value: live-activities
|
||||
scaling:
|
||||
minInstances: 1
|
||||
maxInstances: 10
|
||||
targetCPUPercent: 80
|
||||
buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo
|
||||
startCommand: panic-monitor ./apollo worker --queue LiveActivityJob
|
||||
startCommand: panic-monitor ./apollo worker --consumers 256
|
||||
|
||||
envVarGroups:
|
||||
# Environment
|
||||
|
|
Loading…
Reference in a new issue