Skip to content

Commit

Permalink
Merge pull request #5491 from novuhq/enterprise-demo
Browse files Browse the repository at this point in the history
Add novu enterprise trail docker compose file
  • Loading branch information
Cliftonz authored May 3, 2024
2 parents f88caaf + 61d92f1 commit 87b3232
Show file tree
Hide file tree
Showing 3 changed files with 249 additions and 0 deletions.
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -731,5 +731,6 @@
".env.local",
".env.production",
".env.test",
"servername"
]
}
63 changes: 63 additions & 0 deletions docker/enterprise/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Novu Enterprise: On-Premises Non-Production Trial with Docker Compose

This documentation guides you through the process of setting up an on-premises trial of Novu Enterprise using Docker Compose.

To do this trial you will need to contact [sales](https://notify.novu.co/meetings/ryannovu/30minutes) to get a token.

Note: This is not our preferred way of doing an enterprise trial,
all features are available on Novu Cloud with a free trial.

## Before You Begin

Ensure that the following software has been installed on your system:

- [Docker](https://docs.docker.com/engine/install/) and [docker-compose](https://docs.docker.com/compose/install/)
- [Git](https://git-scm.com/downloads)

## Guide

### Get the Code

Warning: Before you start this process, If you have an existing mongodb volume you will need to remove it to
ensure the enterprise tables are installed correctly.

Clone the Novu repository and navigate to the Docker directory:

```sh
# Add the token to the shell env
NOVU_ENTERPRISE_TOKEN=ghp_xxxx

# Get the code
git clone https://github.com/novuhq/novu

# Go to the docker folder
cd novu/docker

# Copy the example env file
cp .env.example ./enterprise/.env

# Login
echo "$NOVU_ENTERPRISE_TOKEN" | docker login --username <provided_username> --password-stdin

# Start Novu
docker-compose -f ./enterprise/docker-compose.enterprise.yml up
```

Now visit [http://127.0.0.1:4200](http://127.0.0.1:4200) to start using Novu.

## Secure Your Setup
Though we provide some example secrets for getting started, it's highly recommended NOT to deploy your Novu setup using the defaults provided.
Update the .env file with your own secrets, in particular, make sure you replace:
JWT_SECRET: A secret key used by the API to generate JWT tokens.

## Redis Configuration
You can configure Redis TLS by adding the following variables to the .env file and specifying the needed properties:
REDIS_TLS={"servername":"localhost"}
REDIS_CACHE_SERVICE_TLS={"servername":"localhost"}

## Configuration
For simplicity, we made decisions that might not be optimal for production:
- The database is on the same machine as the servers.
- The storage uses the filesystem backend instead of S3.

We strongly advise decoupling your storage before deploying Novu in a production environment.
185 changes: 185 additions & 0 deletions docker/enterprise/docker-compose.enterprise.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
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-ee:prod'
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}
ports:
- '3000:3000'
worker:
image: 'ghcr.io/novuhq/novu/worker-ee:prod'
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}
ws:
image: 'ghcr.io/novuhq/novu/ws-ee:prod'
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-ee:prod'
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}
ports:
- 4200:4200
widget:
image: 'ghcr.io/novuhq/novu/widget-ee:prod'
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-ee:prod'
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: ~

0 comments on commit 87b3232

Please sign in to comment.