Skip to content

Commit

Permalink
fix: bring back comunity self hostdocker compose file (#5718)
Browse files Browse the repository at this point in the history
  • Loading branch information
jainpawan21 authored Jun 12, 2024
1 parent 15e5853 commit 4c9ba00
Show file tree
Hide file tree
Showing 4 changed files with 256 additions and 0 deletions.
66 changes: 66 additions & 0 deletions docker/community/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Secrets
# YOU MUST CHANGE THESE BEFORE GOING INTO PRODUCTION
# used as a secret to verify the JWT token signature
JWT_SECRET=your-secret
# used to encrypt/decrypt the provider credentials
STORE_ENCRYPTION_KEY=<ENCRYPTION_KEY_MUST_BE_32_LONG>

# Host
HOST_NAME=http://localhost

# General
# available values 'dev', 'test', 'production', 'ci', 'local'
NODE_ENV=local
MONGO_MAX_POOL_SIZE=200
MONGO_MIN_POOL_SIZE=100
# MONGO USER
MONGO_INITDB_ROOT_USERNAME=root
# MONGO PASSWORD
MONGO_INITDB_ROOT_PASSWORD=secret
MONGO_URL=mongodb://root:secret@mongodb:27017/novu-db?authSource=admin
REDIS_HOST=redis

DOCKER_REDIS_SERVICE_PORT=6379
REDIS_PASSWORD=
REDIS_CACHE_SERVICE_HOST=

# AWS
S3_LOCAL_STACK=$HOST_NAME:4566
S3_BUCKET_NAME=novu-local
S3_REGION=us-east-1
AWS_ACCESS_KEY_ID=test
AWS_SECRET_ACCESS_KEY=test

# Ports
API_PORT=3000
REDIS_PORT=6379
REDIS_CACHE_SERVICE_PORT=6379
WS_PORT=3002

# Root URL
REACT_APP_WS_URL=$HOST_NAME:3002
# Uncomment this one when deploying Novu in the local environment
# as Web app local Dockerfile will have to load this to be used.
# Deployment version doesn't need as we inject it with API_ROOT_URL value.
# REACT_APP_API_URL=http://localhost:3000
API_ROOT_URL=$HOST_NAME:3000
DISABLE_USER_REGISTRATION=false
FRONT_BASE_URL=$HOST_NAME:4200
WIDGET_EMBED_PATH=$HOST_NAME:4701/embed.umd.min.js
WIDGET_URL=$HOST_NAME:4500

# Context Paths
# Only needed for setups with reverse-proxies
GLOBAL_CONTEXT_PATH=
WEB_CONTEXT_PATH=
API_CONTEXT_PATH=
WS_CONTEXT_PATH=
WIDGET_CONTEXT_PATH=

# Analytics
SENTRY_DSN=
# change these values
NEW_RELIC_APP_NAME=
NEW_RELIC_LICENSE_KEY=

IS_MULTI_TENANCY_ENABLED=true
188 changes: 188 additions & 0 deletions docker/community/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
version: '3.9'
name: novu
services:
redis:
image: 'redis:alpine'
container_name: redis
restart: unless-stopped
logging:
driver: 'none'
mongodb:
image: mongo
container_name: mongodb
restart: unless-stopped
logging:
driver: 'json-file'
options:
max-size: '50m'
max-file: '5'
environment:
- PUID=1000
- PGID=1000
- MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
volumes:
- mongodb:/data/db
ports:
- 27017:27017
api:
image: 'ghcr.io/novuhq/novu/api:0.24.0'
depends_on:
- mongodb
- redis
container_name: api
restart: unless-stopped
logging:
driver: 'json-file'
options:
max-size: '50m'
max-file: '5'
environment:
NODE_ENV: ${NODE_ENV}
API_ROOT_URL: ${API_ROOT_URL}
DISABLE_USER_REGISTRATION: ${DISABLE_USER_REGISTRATION}
PORT: ${API_PORT}
FRONT_BASE_URL: ${FRONT_BASE_URL}
MONGO_URL: ${MONGO_URL}
MONGO_MIN_POOL_SIZE: ${MONGO_MIN_POOL_SIZE}
MONGO_MAX_POOL_SIZE: ${MONGO_MAX_POOL_SIZE}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
REDIS_PASSWORD: ${REDIS_PASSWORD}
REDIS_DB_INDEX: 2
REDIS_CACHE_SERVICE_HOST: ${REDIS_CACHE_SERVICE_HOST}
REDIS_CACHE_SERVICE_PORT: ${REDIS_CACHE_SERVICE_PORT}
S3_LOCAL_STACK: ${S3_LOCAL_STACK}
S3_BUCKET_NAME: ${S3_BUCKET_NAME}
S3_REGION: ${S3_REGION}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
JWT_SECRET: ${JWT_SECRET}
STORE_ENCRYPTION_KEY: ${STORE_ENCRYPTION_KEY}
SENTRY_DSN: ${SENTRY_DSN}
NEW_RELIC_APP_NAME: ${NEW_RELIC_APP_NAME}
NEW_RELIC_LICENSE_KEY: ${NEW_RELIC_LICENSE_KEY}
API_CONTEXT_PATH: ${API_CONTEXT_PATH}
IS_MULTI_TENANCY_ENABLED: ${IS_MULTI_TENANCY_ENABLED}
ports:
- '3000:3000'
worker:
image: 'ghcr.io/novuhq/novu/worker:0.24.0'
depends_on:
- mongodb
- redis
container_name: worker
restart: unless-stopped
logging:
driver: 'json-file'
options:
max-size: '50m'
max-file: '5'
environment:
NODE_ENV: ${NODE_ENV}
MONGO_URL: ${MONGO_URL}
MONGO_MAX_POOL_SIZE: ${MONGO_MAX_POOL_SIZE}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
REDIS_PASSWORD: ${REDIS_PASSWORD}
REDIS_DB_INDEX: 2
REDIS_CACHE_SERVICE_HOST: ${REDIS_CACHE_SERVICE_HOST}
REDIS_CACHE_SERVICE_PORT: ${REDIS_CACHE_SERVICE_PORT}
S3_LOCAL_STACK: ${S3_LOCAL_STACK}
S3_BUCKET_NAME: ${S3_BUCKET_NAME}
S3_REGION: ${S3_REGION}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
STORE_ENCRYPTION_KEY: ${STORE_ENCRYPTION_KEY}
SENTRY_DSN: ${SENTRY_DSN}
NEW_RELIC_APP_NAME: ${NEW_RELIC_APP_NAME}
NEW_RELIC_LICENSE_KEY: ${NEW_RELIC_LICENSE_KEY}
BROADCAST_QUEUE_CHUNK_SIZE: ${BROADCAST_QUEUE_CHUNK_SIZE}
MULTICAST_QUEUE_CHUNK_SIZE: ${MULTICAST_QUEUE_CHUNK_SIZE}
IS_MULTI_TENANCY_ENABLED: ${IS_MULTI_TENANCY_ENABLED}
ws:
image: 'ghcr.io/novuhq/novu/ws:0.24.0'
depends_on:
- mongodb
- redis
container_name: ws
restart: unless-stopped
logging:
driver: 'json-file'
options:
max-size: '50m'
max-file: '5'
environment:
PORT: ${WS_PORT}
NODE_ENV: ${NODE_ENV}
MONGO_URL: ${MONGO_URL}
MONGO_MAX_POOL_SIZE: ${MONGO_MAX_POOL_SIZE}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
REDIS_PASSWORD: ${REDIS_PASSWORD}
JWT_SECRET: ${JWT_SECRET}
WS_CONTEXT_PATH: ${WS_CONTEXT_PATH}
NEW_RELIC_APP_NAME: ${NEW_RELIC_APP_NAME}
NEW_RELIC_LICENSE_KEY: ${NEW_RELIC_LICENSE_KEY}
ports:
- '3002:3002'
web:
image: 'ghcr.io/novuhq/novu/web:0.24.0'
depends_on:
- api
- worker
container_name: web
restart: unless-stopped
logging:
driver: 'json-file'
options:
max-size: '50m'
max-file: '5'
environment:
REACT_APP_API_URL: ${API_ROOT_URL}
REACT_APP_ENVIRONMENT: ${NODE_ENV}
REACT_APP_WIDGET_EMBED_PATH: ${WIDGET_EMBED_PATH}
REACT_APP_DOCKER_HOSTED_ENV: 'true'
REACT_APP_WS_URL: ${REACT_APP_WS_URL}
IS_MULTI_TENANCY_ENABLED: ${IS_MULTI_TENANCY_ENABLED}
ports:
- 4200:4200
widget:
image: 'ghcr.io/novuhq/novu/widget:0.24.0'
depends_on:
- api
- worker
- web
container_name: widget
restart: unless-stopped
logging:
driver: 'json-file'
options:
max-size: '50m'
max-file: '5'
environment:
REACT_APP_API_URL: ${API_ROOT_URL}
REACT_APP_WS_URL: ${REACT_APP_WS_URL}
REACT_APP_ENVIRONMENT: ${NODE_ENV}
WIDGET_CONTEXT_PATH: ${WIDGET_CONTEXT_PATH}
ports:
- 4500:4500
embed:
depends_on:
- widget
image: 'ghcr.io/novuhq/novu/embed:0.24.0'
container_name: embed
restart: unless-stopped
logging:
driver: 'json-file'
options:
max-size: '50m'
max-file: '5'
environment:
WIDGET_URL: ${WIDGET_URL}
NEW_RELIC_APP_NAME: ${NEW_RELIC_APP_NAME}
NEW_RELIC_LICENSE_KEY: ${NEW_RELIC_LICENSE_KEY}
ports:
- 4701:4701
volumes:
mongodb: ~
2 changes: 2 additions & 0 deletions docker/enterprise/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ SENTRY_DSN=
# change these values
NEW_RELIC_APP_NAME=
NEW_RELIC_LICENSE_KEY=

IS_MULTI_TENANCY_ENABLED=true
File renamed without changes.

0 comments on commit 4c9ba00

Please sign in to comment.