oneuptime/docker-compose.base.yml
2023-08-02 18:26:56 +01:00

415 lines
11 KiB
YAML

version: '3.7'
x-common-variables: &common-variables
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}
ANALYTICS_KEY: ${ANALYTICS_KEY}
ANALYTICS_HOST: ${ANALYTICS_HOST}
HTTP_PROTOCOL: ${HTTP_PROTOCOL}
x-common-ui-variables: &common-ui-variables
<<: *common-variables
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}
x-common-server-variables: &common-server-variables
<<: *common-variables
ONEUPTIME_SECRET: ${ONEUPTIME_SECRET}
DATABASE_PORT: ${DATABASE_PORT}
DATABASE_USERNAME: ${DATABASE_USERNAME}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
DATABASE_NAME: ${DATABASE_NAME}
DATABASE_HOST: ${DATABASE_HOST}
DATABASE_SSL_CA: ${DATABASE_SSL_CA}
DATABASE_SSL_KEY: ${DATABASE_SSL_KEY}
DATABASE_SSL_CERT: ${DATABASE_SSL_CERT}
DATABASE_SSL_REJECT_UNAUTHORIZED: ${DATABASE_SSL_REJECT_UNAUTHORIZED}
REDIS_USERNAME: ${REDIS_USERNAME}
REDIS_PASSWORD: ${REDIS_PASSWORD}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
REDIS_DB: ${REDIS_DB}
REDIS_TLS_CA: ${REDIS_TLS_CA}
REDIS_TLS_SENTINEL_MODE: ${REDIS_TLS_SENTINEL_MODE}
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}
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
services:
minio:
networks:
- oneuptime
image: minio/minio:latest
restart: always
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
volumes:
- minio:/data
haraka:
networks:
- oneuptime
image: oneuptime/haraka:${APP_TAG}
restart: always
environment:
SMTP_USER: ${INTERNAL_SMTP_USER}
SMTP_PASSWORD: ${INTERNAL_SMTP_PASSWORD}
redis:
image: redis:7.0.3
restart: always
networks:
- oneuptime
command: redis-server --requirepass "${REDIS_PASSWORD}"
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
clickhouse:
image: clickhouse/clickhouse-server:23.2
restart: always
environment:
CLICKHOUSE_USER: ${CLICKHOUSE_USER}
CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD}
CLICKHOUSE_DB: ${CLICKHOUSE_DATABASE}
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
networks:
- oneuptime
volumes:
- clickhouse:/var/lib/clickhouse/
postgres:
image: postgres:latest
restart: always
environment:
POSTGRES_USER: ${DATABASE_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
networks:
- oneuptime
volumes:
- postgres:/var/lib/postgresql/data
notification:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
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}
depends_on:
- haraka
accounts:
networks:
- oneuptime
restart: always
environment:
<<: *common-ui-variables
PORT: ${ACCOUNTS_PORT}
depends_on:
- identity
dashboard:
networks:
- oneuptime
restart: always
environment:
<<: *common-ui-variables
PORT: ${DASHBOARD_PORT}
depends_on:
- identity
- accounts
status-page:
networks:
- oneuptime
restart: always
environment:
<<: *common-ui-variables
PORT: ${STATUS_PAGE_PORT}
depends_on:
- accounts
- dashboard-api
test-server:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${TEST_SERVER_PORT}
dashboard-api:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${DASHBOARD_API_PORT}
depends_on:
- redis
- postgres
- notification
links:
- redis
- postgres
- notification
link-shortener:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${LINK_SHORTENER_PORT}
depends_on:
- redis
- postgres
links:
- redis
- postgres
workflow:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${WORKFLOW_PORT}
depends_on:
- redis
- postgres
- notification
links:
- redis
- postgres
- notification
workers:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${WORKERS_PORT}
ENVIRONMENT: ${ENVIRONMENT}
depends_on:
- postgres
- notification
links:
- postgres
- notification
volumes:
- ./Certs:/usr/src/Certs
probe-1:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${PROBE_PORT}
PROBE_NAME: ${GLOBAL_PROBE_1_NAME}
PROBE_DESCRIPTION: ${GLOBAL_PROBE_1_DESCRIPTION}
PROBE_KEY: ${GLOBAL_PROBE_1_KEY}
PROBE_API_URL: http://${PROBE_API_HOSTNAME}
depends_on:
- probe-api
links:
- probe-api
probe-2:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${PROBE_PORT}
PROBE_NAME: ${GLOBAL_PROBE_2_NAME}
PROBE_DESCRIPTION: ${GLOBAL_PROBE_2_DESCRIPTION}
PROBE_KEY: ${GLOBAL_PROBE_2_KEY}
PROBE_API_URL: http://${PROBE_API_HOSTNAME}
depends_on:
- probe-api
links:
- probe-api
identity:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${IDENTITY_PORT}
depends_on:
- redis
- postgres
- notification
links:
- redis
- postgres
- notification
probe-api:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${PROBE_API_PORT}
depends_on:
- redis
- postgres
- notification
links:
- redis
- postgres
- notification
file:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${FILE_PORT}
depends_on:
- postgres
links:
- postgres
home:
networks:
- oneuptime
environment:
<<: *common-ui-variables
PORT: ${HOME_PORT}
api-reference:
networks:
- oneuptime
restart: always
environment:
<<: *common-ui-variables
PORT: ${API_DOCS_PORT}
nginx:
depends_on:
- identity
- accounts
- dashboard-api
- dashboard
- home
- notification
restart: always
networks:
- oneuptime
image: nginx:1.23.3-alpine
environment:
<<: *common-variables
ports:
- '80:80'
- '443:443'
volumes:
- ./Certs:/etc/nginx/certs
volumes:
postgres:
clickhouse:
minio:
networks:
oneuptime:
driver: bridge