Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
4rthem committed Dec 3, 2024
1 parent bf36a79 commit 839c954
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -289,3 +289,26 @@ SENTRY_RELEASE=unknown
SOKETI_APP_ID=phrasea
SOKETI_KEY=__CHANGE_ME_hJBgAG4vnPrT58Ty
SOKETI_SECRET=__CHANGE_ME_A8PRgk5qpfLxkfLU

NOVU_VERSION=2.1.0

NOVU_API_BASE_URL=https://api-novu.${PHRASEA_DOMAIN}${HTTPS_PORT_PREFIX}
NOVU_FRONT_BASE_URL=https://novu.${PHRASEA_DOMAIN}${HTTPS_PORT_PREFIX}
NOVU_WS_URL=https://ws-novu.${PHRASEA_DOMAIN}${HTTPS_PORT_PREFIX}

NOVU_REDIS_HOST=redis
NOVU_REDIS_PORT=6379
NOVU_REDIS_PASSWORD=
NOVU_REDIS_CACHE_SERVICE_HOST=redis
NOVU_REDIS_CACHE_SERVICE_PORT=6379
NOVU_JWT_SECRET=__CHANGE_ME_8Gt1eIKSWgd7Ex5UMJTmkA
NOVU_STORE_ENCRYPTION_KEY=__CHANGE_ME_y8cPSNUNvomVxLgdQVp7

NOVU_WS_CONTEXT_PATH=

NOVU_MONGO_MAX_POOL_SIZE=200
NOVU_MONGO_MIN_POOL_SIZE=75

MONGO_INITDB_ROOT_USERNAME=root
MONGO_INITDB_ROOT_PASSWORD=secret
NOVU_MONGO_URL=mongodb://$MONGO_INITDB_ROOT_USERNAME:$MONGO_INITDB_ROOT_PASSWORD@mongodb:27017/novu-db?authSource=admin
101 changes: 101 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1082,6 +1082,106 @@ services:
- "traefik.http.services.soketi-usage.loadbalancer.server.port=9601"
- "traefik.project_name=${COMPOSE_PROJECT_NAME}"

mongodb:
image: mongo:8.0.3
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

novu-api:
image: ghcr.io/novuhq/novu/api:${NOVU_VERSION}
depends_on:
mongodb:
condition: service_healthy
redis:
condition: service_healthy
environment:
API_ROOT_URL: ${NOVU_API_BASE_URL}
DISABLE_USER_REGISTRATION: 'true'
FRONT_BASE_URL: ${NOVU_FRONT_BASE_URL}
MONGO_URL: ${NOVU_MONGO_URL}
MONGO_MIN_POOL_SIZE: ${NOVU_MONGO_MIN_POOL_SIZE}
MONGO_MAX_POOL_SIZE: ${NOVU_MONGO_MAX_POOL_SIZE}
REDIS_HOST: ${NOVU_REDIS_HOST}
REDIS_PORT: ${NOVU_REDIS_PORT}
REDIS_PASSWORD: ${NOVU_REDIS_PASSWORD}
REDIS_DB_INDEX: 2
REDIS_CACHE_SERVICE_HOST: ${NOVU_REDIS_CACHE_SERVICE_HOST}
REDIS_CACHE_SERVICE_PORT: ${NOVU_REDIS_CACHE_SERVICE_PORT}
JWT_SECRET: ${NOVU_JWT_SECRET}
STORE_ENCRYPTION_KEY: ${NOVU_STORE_ENCRYPTION_KEY}
labels:
- "traefik.enable=true"
- "traefik.project_name=${COMPOSE_PROJECT_NAME}"
- "traefik.http.routers.novu-api.rule=Host(`api-novu.${PHRASEA_DOMAIN}`)"
- "traefik.http.services.novu-api.loadbalancer.server.port=3000"

novu-worker:
image: ghcr.io/novuhq/novu/worker:${NOVU_VERSION}
depends_on:
mongodb:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
environment:
MONGO_URL: ${NOVU_MONGO_URL}
MONGO_MAX_POOL_SIZE: ${NOVU_MONGO_MAX_POOL_SIZE}
REDIS_HOST: ${NOVU_REDIS_HOST}
REDIS_PORT: ${NOVU_REDIS_PORT}
REDIS_PASSWORD: ${NOVU_REDIS_PASSWORD}
REDIS_DB_INDEX: 2
REDIS_CACHE_SERVICE_HOST: ${NOVU_REDIS_CACHE_SERVICE_HOST}
REDIS_CACHE_SERVICE_PORT: ${NOVU_REDIS_CACHE_SERVICE_PORT}

novu-ws:
image: ghcr.io/novuhq/novu/ws:${NOVU_VERSION}
depends_on:
mongodb:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
environment:
MONGO_URL: ${NOVU_MONGO_URL}
MONGO_MAX_POOL_SIZE: ${NOVU_MONGO_MAX_POOL_SIZE}
REDIS_HOST: ${NOVU_REDIS_HOST}
REDIS_PORT: ${NOVU_REDIS_PORT}
REDIS_PASSWORD: ${NOVU_REDIS_PASSWORD}
JWT_SECRET: ${NOVU_JWT_SECRET}
WS_CONTEXT_PATH: ${NOVU_WS_CONTEXT_PATH}
labels:
- "traefik.enable=true"
- "traefik.project_name=${COMPOSE_PROJECT_NAME}"
- "traefik.http.routers.novu-ws.rule=Host(`ws-novu.${PHRASEA_DOMAIN}`)"
- "traefik.http.services.novu-ws.loadbalancer.server.port=3002"

novu-web:
image: ghcr.io/novuhq/novu/web:${NOVU_VERSION}
depends_on:
- novu-api
restart: unless-stopped
environment:
REACT_APP_API_URL: ${NOVU_API_BASE_URL}
REACT_APP_IS_SELF_HOSTED: 'true'
REACT_APP_WS_URL: ${NOVU_WS_URL}
command: ['/bin/sh', '-c', 'pnpm run envsetup:docker && pnpm run start:static:build']
healthcheck:
test: ['CMD-SHELL', 'curl --silent --fail http://localhost:4200 || exit 1']
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
labels:
- "traefik.enable=true"
- "traefik.project_name=${COMPOSE_PROJECT_NAME}"
- "traefik.http.routers.novu-web.rule=Host(`novu.${PHRASEA_DOMAIN}`)"
- "traefik.http.services.novu-web.loadbalancer.server.port=4200"

volumes:
db:
redis:
Expand All @@ -1095,3 +1195,4 @@ volumes:
expose-nginx-cache:
zippy:
cypress_output:
mongodb:

0 comments on commit 839c954

Please sign in to comment.