oneuptime/docker-compose.base.yml

394 lines
10 KiB
YAML
Raw Normal View History

2023-07-11 21:31:38 +00:00
version: '3.7'
2023-07-15 10:28:50 +00:00
x-secrets: &common-variables
2023-07-12 08:29:36 +00:00
x-common-variables: &common-variables
2023-07-15 10:28:50 +00:00
NODE_ENV: ${ENVIRONMENT}
BILLING_ENABLED: ${BILLING_ENABLED}
BILLING_PUBLIC_KEY: ${BILLING_PUBLIC_KEY}
SUBSCRIPTION_PLAN_BASIC: ${SUBSCRIPTION_PLAN_BASIC}
SUBSCRIPTION_PLAN_GROWTH: ${SUBSCRIPTION_PLAN_GROWTH}
SUBSCRIPTION_PLAN_SCALE: ${SUBSCRIPTION_PLAN_SCALE}
SUBSCRIPTION_PLAN_ENTERPRISE: ${SUBSCRIPTION_PLAN_ENTERPRISE}
METERED_PLAN_ACTIVE_MONITORING: ${METERED_PLAN_ACTIVE_MONITORING}
DOMAIN: ${DOMAIN}
2023-07-12 08:29:36 +00:00
x-common-ui-variables: &common-ui-variables
2023-07-15 10:28:50 +00:00
REALTIME_ROUTE: ${REALTIME_ROUTE}
NOTIFICATION_ROUTE: ${NOTIFICATION_ROUTE}
DASHBOARD_ROUTE: ${DASHBOARD_ROUTE}
DASHBOARD_API_ROUTE: ${DASHBOARD_API_ROUTE}
PROBE_API_ROUTE: ${PROBE_API_ROUTE}
DATA_INGESTOR_ROUTE: ${DATA_INGESTOR_ROUTE}
ACCOUNTS_ROUTE: ${ACCOUNTS_ROUTE}
HOME_ROUTE: ${HOME_ROUTE}
HELMCHARTS_ROUTE: ${HELMCHARTS_ROUTE}
API_REFERENCE_ROUTE: ${API_REFERENCE_ROUTE}
IDENTITY_ROUTE: ${IDENTITY_ROUTE}
WORKFLOW_ROUTE: ${WORKFLOW_ROUTE}
FILE_ROUTE: ${FILE_ROUTE}
STATUS_PAGE_ROUTE: ${STATUS_PAGE_ROUTE}
IS_SERVER: false
STATUS_PAGE_CNAME_RECORD: ${STATUS_PAGE_CNAME_RECORD}
DOMAIN: ${DOMAIN}
HTTP_PROTOCOL: ${HTTP_PROTOCOL}
ANALYTICS_KEY: ${ANALYTICS_KEY}
ANALYTICS_HOST: ${ANALYTICS_HOST}
2023-07-12 08:29:36 +00:00
x-common-server-variables: &common-server-variables
2023-07-15 10:28:50 +00:00
ONEUPTIME_SECRET: ${ONEUPTIME_SECRET}
DATABASE_PORT: ${DATABASE_PORT}
DATABASE_USERNAME: ${DATABASE_USERNAME}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
DATABASE_NAME: ${DATABASE_NAME}
DATABASE_HOST: ${DATABASE_HOST}
REDIS_PASSWORD: ${REDIS_PASSWORD}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
ENCRYPTION_SECRET: ${ENCRYPTION_SECRET}
DISABLE_SIGNUP: ${DISABLE_SIGNUP}
REALTIME_HOSTNAME: ${REALTIME_HOSTNAME}
NOTIFICATION_HOSTNAME: ${NOTIFICATION_HOSTNAME}
DASHBOARD_HOSTNAME: ${DASHBOARD_HOSTNAME}
DASHBOARD_API_HOSTNAME: ${DASHBOARD_API_HOSTNAME}
PROBE_API_HOSTNAME: ${DATA_INGESTOR_HOSTNAME}
DATA_INGESTOR_HOSTNAME: ${DATA_INGESTOR_HOSTNAME}
ACCOUNTS_HOSTNAME: ${ACCOUNTS_HOSTNAME}
HOME_HOSTNAME: ${HOME_HOSTNAME}
WORKER_HOSTNAME: ${WORKER_HOSTNAME}
WORKFLOW_HOSTNAME: ${WORKFLOW_HOSTNAME}
BILLING_PRIVATE_KEY: ${BILLING_PRIVATE_KEY}
BILLING_PUBLIC_KEY: ${BILLING_PUBLIC_KEY}
BILLING_ENABLED: ${BILLING_ENABLED}
DOMAIN: ${DOMAIN}
HTTP_PROTOCOL: ${HTTP_PROTOCOL}
REALTIME_ROUTE: ${REALTIME_ROUTE}
NOTIFICATION_ROUTE: ${NOTIFICATION_ROUTE}
DASHBOARD_ROUTE: ${DASHBOARD_ROUTE}
DASHBOARD_API_ROUTE: ${DASHBOARD_API_ROUTE}
PROBE_API_ROUTE: ${PROBE_API_ROUTE}
DATA_INGESTOR_ROUTE: ${DATA_INGESTOR_ROUTE}
ACCOUNTS_ROUTE: ${ACCOUNTS_ROUTE}
HOME_ROUTE: ${HOME_ROUTE}
HELMCHARTS_ROUTE: ${HELMCHARTS_ROUTE}
API_REFERENCE_ROUTE: ${API_REFERENCE_ROUTE}
IDENTITY_ROUTE: ${IDENTITY_ROUTE}
FILE_ROUTE: ${FILE_ROUTE}
WORKFLOW_ROUTE: ${WORKFLOW_ROUTE}
STATUS_PAGE_ROUTE: ${STATUS_PAGE_ROUTE}
IS_SERVER: true
ANALYTICS_KEY: ${ANALYTICS_KEY}
ANALYTICS_HOST: ${ANALYTICS_HOST}
2023-07-12 08:29:36 +00:00
2023-07-11 21:31:38 +00:00
services:
haraka:
ports:
- '2525:2525'
image: oneuptime/haraka:${APP_TAG}
restart: always
2023-07-15 10:28:50 +00:00
environment:
- SMTP_USER=${INTERNAL_SMTP_USER}
- SMTP_PASSWORD=${INTERNAL_SMTP_PASSWORD}
2023-07-11 21:31:38 +00:00
redis:
image: redis:7.0.3
restart: always
ports:
- '6370:6379'
command: redis-server --requirepass "${REDIS_PASSWORD}"
2023-07-15 10:28:50 +00:00
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD}
2023-07-11 21:31:38 +00:00
clickhouse:
image: clickhouse/clickhouse-server:23.2
restart: always
2023-07-15 10:28:50 +00:00
environment:
- CLICKHOUSE_USER=${CLICKHOUSE_USER}
- CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD}
- CLICKHOUSE_DB=oneuptime
- CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1
2023-07-11 21:31:38 +00:00
ports:
- '8123:8123'
- '9000:9000'
- '9440:9440'
- '9009:9009'
volumes:
- clickhouse:/var/lib/clickhouse/
postgres:
image: postgres:latest
restart: always
2023-07-15 10:28:50 +00:00
environment:
- POSTGRES_USER=${DATABASE_USERNAME}
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
- POSTGRES_DB=${DATABASE_NAME}
2023-07-11 21:31:38 +00:00
ports:
- '5400:5432'
volumes:
- postgres:/var/lib/postgresql/data
notification:
ports:
- 3191:3191
image: oneuptime/notification:${APP_TAG}
restart: always
2023-07-15 10:28:50 +00:00
environment:
- PORT=${NOTIFICATION_PORT}
- SMTP_USERNAME=${SMTP_USERNAME}
- SMTP_PASSWORD=${SMTP_PASSWORD}
- SMTP_PORT=${SMTP_PORT}
- SMTP_EMAIL=${SMTP_EMAIL}
- SMTP_FROM_NAME=${SMTP_FROM_NAME}
- SMTP_IS_SECURE=${SMTP_IS_SECURE}
- SMTP_HOST=${SMTP_HOST}
- SENDGRID_API_KEY=${SENDGRID_API_KEY}
- TWILIO_ACCOUNT_SID=${TWILIO_ACCOUNT_SID}
- TWILIO_AUTH_TOKEN=${TWILIO_AUTH_TOKEN}
- TWILIO_PHONE_NUMBER=${TWILIO_PHONE_NUMBER}
- SMS_DEFAULT_COST_IN_CENTS=${SMS_DEFAULT_COST_IN_CENTS}
- CALL_DEFAULT_COST_IN_CENTS_PER_MINUTE=${CALL_DEFAULT_COST_IN_CENTS_PER_MINUTE}
2023-07-11 21:31:38 +00:00
depends_on:
- haraka
accounts:
ports:
- '3003:3003'
image: oneuptime/accounts:${APP_TAG}
restart: always
2023-07-15 10:28:50 +00:00
environment:
- PORT=${ACCOUNTS_PORT}
2023-07-11 21:31:38 +00:00
depends_on:
- identity
dashboard:
ports:
- '3009:3009'
image: oneuptime/dashboard:${APP_TAG}
restart: always
2023-07-15 10:28:50 +00:00
environment:
- PORT=${DASHBOARD_PORT}
2023-07-11 21:31:38 +00:00
depends_on:
- identity
- accounts
status-page:
ports:
- '3105:3105' # HTTP UI Port
image: oneuptime/status-page:${APP_TAG}
restart: always
2023-07-15 10:28:50 +00:00
environment:
- PORT=${STATUS_PAGE_PORT}
2023-07-11 21:31:38 +00:00
depends_on:
- accounts
- dashboard-api
dashboard-api:
ports:
- '3002:3002'
image: oneuptime/dashboard-api:${APP_TAG}
restart: always
2023-07-15 10:28:50 +00:00
environment:
- PORT=${DASHBOARD_API_PORT}
2023-07-11 21:31:38 +00:00
depends_on:
- redis
- postgres
- notification
links:
- redis
- postgres
- notification
link-shortner:
ports:
- '3521:3521'
image: oneuptime/link-shortner:${APP_TAG}
restart: always
env_file:
2023-07-15 10:28:50 +00:00
- PORT=${LINK_SHORTNER_PORT}
2023-07-11 21:31:38 +00:00
depends_on:
- redis
- postgres
links:
- redis
- postgres
workflow:
ports:
- '3099:3099'
image: oneuptime/workflow:${APP_TAG}
restart: always
2023-07-15 10:28:50 +00:00
environment:
- PORT=${WORKFLOW_PORT}
2023-07-11 21:31:38 +00:00
depends_on:
- redis
- postgres
- notification
links:
- redis
- postgres
- notification
workers:
ports:
- '3452:3452'
image: oneuptime/workers:${APP_TAG}
restart: always
2023-07-15 10:28:50 +00:00
environment:
- PORT=${WORKERS_PORT}
- ENVIRONMENT=${ENVIRONMENT}
2023-07-11 21:31:38 +00:00
depends_on:
- postgres
- notification
links:
- postgres
- notification
volumes:
- ./Certs:/usr/src/Certs
probe-1:
image: oneuptime/probe:${APP_TAG}
restart: always
environment:
2023-07-15 10:28:50 +00:00
- PORT=${PROBE_PORT}
- PROBE_NAME=${GLOBAL_PROBE_1_NAME}
- PROBE_DESCRIPTION=${GLOBAL_PROBE_1_DESCRIPTION}
- PROBE_KEY=${GLOBAL_PROBE_1_KEY}
2023-07-11 21:31:38 +00:00
- PROBE_API_URL=http://probe-api:3400
depends_on:
- probe-api
links:
- probe-api
volumes:
- ./Certs:/usr/src/Certs
probe-2:
image: oneuptime/probe:${APP_TAG}
restart: always
env_file:
- ./Common/.env
- ./CommonServer/.env
- ./Probe/.env
environment:
2023-07-15 10:28:50 +00:00
- PORT=${PROBE_PORT}
- PROBE_NAME=${GLOBAL_PROBE_2_NAME}
- PROBE_DESCRIPTION=${GLOBAL_PROBE_2_DESCRIPTION}
- PROBE_KEY=${GLOBAL_PROBE_2_KEY}
2023-07-11 21:31:38 +00:00
- PROBE_API_URL=http://probe-api:3400
depends_on:
- probe-api
links:
- probe-api
volumes:
- ./Certs:/usr/src/Certs
identity:
ports:
- '3087:3087'
image: oneuptime/identity:${APP_TAG}
restart: always
2023-07-15 10:28:50 +00:00
environment:
- PORT=${IDENTITY_PORT}
2023-07-11 21:31:38 +00:00
depends_on:
- redis
- postgres
- notification
links:
- redis
- postgres
- notification
probe-api:
ports:
- '3400:3400'
image: oneuptime/probe-api:${APP_TAG}
restart: always
2023-07-15 10:28:50 +00:00
environment:
- PORT=${PROBE_API_PORT}
2023-07-11 21:31:38 +00:00
depends_on:
- redis
- postgres
- notification
links:
- redis
- postgres
- notification
file:
ports:
- '3125:3125'
image: oneuptime/file:${APP_TAG}
restart: always
2023-07-15 10:28:50 +00:00
environment:
- PORT=${FILE_PORT}
2023-07-11 21:31:38 +00:00
depends_on:
- postgres
links:
- postgres
home:
ports:
- '1444:1444'
2023-07-15 10:28:50 +00:00
environment:
- PORT=${HOME_PORT}
2023-07-11 21:31:38 +00:00
image: oneuptime/home:${APP_TAG}
api-reference:
ports:
- '1445:1445'
restart: always
2023-07-15 10:28:50 +00:00
environment:
- PORT=${API_DOCS_PORT}
2023-07-11 21:31:38 +00:00
image: oneuptime/api-reference:${APP_TAG}
nginx:
depends_on:
- identity
- accounts
- dashboard-api
- dashboard
- home
- notification
restart: always
image: nginx:1.23.3-alpine
ports:
- '80:80'
volumes:
- ./Nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./Certs:/etc/nginx/certs
volumes:
postgres:
clickhouse: