mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-14 16:07:42 +00:00
137 lines
2.7 KiB
YAML
137 lines
2.7 KiB
YAML
databases:
|
|
- name: srv.postgres
|
|
plan: pro plus
|
|
user: apollo
|
|
databaseName: apollo
|
|
postgresMajorVersion: 14
|
|
ipAllowList:
|
|
- source: 10.204.0.0/16
|
|
description: internal
|
|
|
|
services:
|
|
# Redis
|
|
- type: redis
|
|
name: srv.redis
|
|
plan: pro
|
|
maxmemoryPolicy: noeviction
|
|
ipAllowList:
|
|
- source: 10.204.0.0/16
|
|
description: internal
|
|
|
|
# PGBouncer
|
|
- type: pserv
|
|
name: srv.pgbouncer
|
|
env: docker
|
|
plan: standard
|
|
repo: https://github.com/renderinc/docker-pgbouncer.git
|
|
envVars:
|
|
- key: ADMIN_USERS
|
|
value: postgres,apollo
|
|
- key: DATABASE_URL
|
|
fromDatabase:
|
|
name: srv.postgres
|
|
property: connectionString
|
|
- key: DEFAULT_POOL_SIZE
|
|
value: 178
|
|
- key: MAX_CLIENT_CONN
|
|
value: 2048
|
|
- key: MIN_POOL_SIZE
|
|
value: 8
|
|
- key: POOL_MODE
|
|
value: transaction
|
|
- key: RESERVE_POOL_TIMEOUT
|
|
value: 1
|
|
- key: SERVER_RESET_QUERY
|
|
value: DISCARD ALL
|
|
|
|
# StatsD
|
|
- type: pserv
|
|
name: srv.statsd
|
|
env: docker
|
|
plan: standard
|
|
repo: https://github.com/andremedeiros/render-datadog.git
|
|
envVars:
|
|
- key: DD_API_KEY
|
|
sync: false
|
|
- key: DD_APM_ENABLED
|
|
value: false
|
|
- key: DD_LOG_LEVEL
|
|
value: ERROR
|
|
|
|
# Faktory
|
|
- type: pserv
|
|
name: srv.faktory
|
|
env: docker
|
|
plan: standard
|
|
repo: https://github.com/contribsys/faktory-render.git
|
|
envVars:
|
|
- key: FAKTORY_PASSWORD
|
|
sync: false
|
|
disk:
|
|
name: faktory-data
|
|
mountPath: /var/lib/faktory
|
|
sizeGB: 10
|
|
|
|
# API
|
|
- type: web
|
|
name: web.api
|
|
env: go
|
|
plan: standard
|
|
healthCheckPath: /v1/health
|
|
envVars:
|
|
- fromGroup: env-settings
|
|
- key: BUGSNAG_APP_TYPE
|
|
value: api
|
|
scaling:
|
|
minInstances: 2
|
|
maxInstances: 4
|
|
targetCPUPercent: 60
|
|
buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo
|
|
startCommand: panic-monitor ./apollo api
|
|
|
|
# Worker
|
|
- type: worker
|
|
name: worker
|
|
env: go
|
|
plan: starter
|
|
envVars:
|
|
- fromGroup: env-settings
|
|
- key: BUGSNAG_APP_TYPE
|
|
value: worker
|
|
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 --consumers 256
|
|
|
|
envVarGroups:
|
|
# Environment
|
|
- name: env-settings
|
|
envVars:
|
|
- key: APPLE_KEY_ID
|
|
sync: false
|
|
- key: APPLE_KEY_PATH
|
|
value: /etc/secrets/apple.p8
|
|
- key: APPLE_TEAM_ID
|
|
sync: false
|
|
- key: BUGSNAG_API_KEY
|
|
sync: false
|
|
- key: DD_API_KEY
|
|
sync: false
|
|
- key: ENV
|
|
sync: false
|
|
- key: REDDIT_CLIENT_ID
|
|
sync: false
|
|
- key: SMTP2GO_API_KEY
|
|
sync: false
|
|
- key: STATSD_URL
|
|
sync: false
|
|
- key: DATABASE_CONNECTION_POOL_URL # This is temporary and should be overwritten
|
|
sync: false
|
|
- key: STATSD_URL
|
|
sync: false
|
|
- key: REDIS_URL
|
|
sync: false
|
|
- key: FAKTORY_URL
|
|
sync: false
|