Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PS-705 novu #502

Merged
merged 12 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
**/.git
**/.pnpm-store
**/build
**/dist
**/.build
**/*.log
**/coverage
**/Dockerfile
**/.dockerignore
**/client/build
**/var
**/vendor
**/public/bundles
Expand All @@ -16,7 +22,6 @@
/doc
/report
/tmp
**/dist
/uploader/client/index.html
/expose/client/index.html
/databox/client/index.html
Expand Down
38 changes: 28 additions & 10 deletions .env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
COMPOSE_PROJECT_NAME=ps
COMPOSE_FILE=docker-compose.yml
COMPOSE_PROFILES=databox,expose,notify,uploader,db,report,tools,mailhog,dashboard,soketi
COMPOSE_PROFILES=databox,expose,uploader,db,report,tools,mailhog,dashboard,soketi,novu

# Leave empty if 443, include ':' otherwise
HTTPS_PORT_PREFIX=${HTTPS_PORT_PREFIX:-}
Expand All @@ -25,7 +25,6 @@ S3_ENDPOINT=https://minio.${PHRASEA_DOMAIN}${HTTPS_PORT_PREFIX}
UPLOADER_API_URL=https://api-uploader.${PHRASEA_DOMAIN}${HTTPS_PORT_PREFIX}
EXPOSE_API_URL=https://api-expose.${PHRASEA_DOMAIN}${HTTPS_PORT_PREFIX}
DATABOX_API_URL=https://api-databox.${PHRASEA_DOMAIN}${HTTPS_PORT_PREFIX}
NOTIFY_API_URL=https://api-notify.${PHRASEA_DOMAIN}${HTTPS_PORT_PREFIX}
DATABOX_CLIENT_URL=https://databox.${PHRASEA_DOMAIN}${HTTPS_PORT_PREFIX}
EXPOSE_CLIENT_URL=https://expose.${PHRASEA_DOMAIN}${HTTPS_PORT_PREFIX}
UPLOADER_CLIENT_URL=https://uploader.${PHRASEA_DOMAIN}${HTTPS_PORT_PREFIX}
Expand All @@ -42,7 +41,6 @@ DATABOX_INDEXER_URL=https://databox-indexer.${PHRASEA_DOMAIN}${HTTPS_PORT_PREFIX

DATABOX_WORKER_REPLICAS=1
EXPOSE_WORKER_REPLICAS=1
NOTIFY_WORKER_REPLICAS=1
UPLOADER_WORKER_REPLICAS=1

REPORT_API_URL=http://report-api
Expand Down Expand Up @@ -109,9 +107,6 @@ EXPOSE_ADMIN_CLIENT_SECRET=__CHANGE_ME_cli3nt_s3cr3t
UPLOADER_ADMIN_CLIENT_ID=uploader-admin
UPLOADER_ADMIN_CLIENT_SECRET=__CHANGE_ME_cli3nt_s3cr3t

NOTIFY_ADMIN_CLIENT_ID=notify-admin
NOTIFY_ADMIN_CLIENT_SECRET=__CHANGE_ME_cli3nt_s3cr3t

DATABOX_ADMIN_CLIENT_ID=databox-admin
DATABOX_ADMIN_CLIENT_SECRET=__CHANGE_ME_cli3nt_s3cr3t

Expand All @@ -135,9 +130,6 @@ EXPOSE_CLOUD_FRONT_TTL=86400
EXPOSE_DISABLE_INDEX_PAGE=0
EXPOSE_MATOMO_SITE_ID=1

# Notify
NOTIFY_RABBITMQ_VHOST=notify

# RabbitMQ
RABBITMQ_HOST=rabbitmq
RABBITMQ_PORT=5672
Expand All @@ -160,7 +152,6 @@ AUTH_DB_NAME=auth

DATABOX_DB_NAME=databox
EXPOSE_DB_NAME=expose
NOTIFY_DB_NAME=notify
UPLOADER_DB_NAME=uploader

MARIADB_ROOT_PASSWORD=__CHANGE_ME_9s0EQbeEn0EQbQC1
Expand Down Expand Up @@ -289,3 +280,30 @@ SENTRY_RELEASE=unknown
SOKETI_APP_ID=phrasea
SOKETI_KEY=__CHANGE_ME_hJBgAG4vnPrT58Ty
SOKETI_SECRET=__CHANGE_ME_A8PRgk5qpfLxkfLU

NOVU_VERSION=2.1.0

NOVU_APPLICATION_IDENTIFIER=
NOVU_SUBSCRIBER_ID=
NOVU_API_HOST=api-novu.${PHRASEA_DOMAIN}${HTTPS_PORT_PREFIX}
NOVU_API_URL="${NOVU_API_URL:-https://${NOVU_API_HOST}}"
NOVU_DASHBOARD_URL=https://novu.${PHRASEA_DOMAIN}${HTTPS_PORT_PREFIX}
NOVU_WS_URL=https://ws-novu.${PHRASEA_DOMAIN}${HTTPS_PORT_PREFIX}
NOVU_STUDIO_URL=https://studio-novu.${PHRASEA_DOMAIN}${HTTPS_PORT_PREFIX}
NOVU_BRIDGE_URL=https://bridge-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_SECRET_KEY=__CHANGE_ME_8djg5x5MJTmkA
NOVU_STORE_ENCRYPTION_KEY=__CHANGE_ME_y8cPSNUNvomVxLgdQVp7

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
23 changes: 9 additions & 14 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
DOCKER_TAG: ${{ github.sha }}
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
VERIFY_SSL: "false"
COMPOSE_PROFILES: databox,expose,notify,uploader,databox-worker,expose-worker,notify-worker,uploader-worker,db,report,mailhog,dashboard
COMPOSE_PROFILES: databox,expose,uploader,db,report,mailhog,dashboard,novu

jobs:
build_keycloak:
Expand All @@ -26,6 +26,14 @@ jobs:
target: keycloak
secrets: inherit

build_novu-bridge:
name: 'Build novu-bridge'
uses: ./.github/workflows/build_base.yaml
with:
image: novu-bridge
context: ./novu/bridge
secrets: inherit

build_php-fpm-base:
name: 'Build php-fpm-base'
uses: ./.github/workflows/build_base.yaml
Expand Down Expand Up @@ -159,18 +167,6 @@ jobs:
context: ./infra/docker/matomo-nginx
secrets: inherit

build_notify_api:
name: 'Build Notify API'
uses: ./.github/workflows/build_api.yaml
with:
prefix: notify
context: ./notify/api
withLibs: true
secrets: inherit
needs:
- build_php-fpm-base
- build_nginx-fpm-base

build_report_api:
name: 'Build Report API'
uses: ./.github/workflows/build.yaml
Expand Down Expand Up @@ -216,7 +212,6 @@ jobs:
- build_keycloak
- build_matomo_nginx
- build_matomo_php
- build_notify_api
- build_report_api
- build_uploader_api
- build_uploader_client
Expand Down
1 change: 0 additions & 1 deletion bin/dev/restart-nginx-services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ load-env
docker compose restart \
databox-api-nginx \
expose-api-nginx \
notify-api-nginx \
uploader-api-nginx
5 changes: 5 additions & 0 deletions bin/dev/sync-novu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

. bin/vars.sh

docker compose exec novu-bridge pnpm sync
1 change: 0 additions & 1 deletion bin/migrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ docker compose run --rm dockerize

APPS="
expose-api-php
notify-api-php
databox-api-php
uploader-api-php
"
Expand Down
2 changes: 0 additions & 2 deletions bin/ops/db/db.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/bin/sh

DATABASES="
auth
databox
expose
uploader
notify
"
6 changes: 0 additions & 6 deletions bin/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,6 @@ COMPOSE_PROFILES="${COMPOSE_PROFILES},setup" docker compose run --rm -T --entryp
&& mc mb --ignore-existing minio/$EXPOSE_S3_BUCKET_NAME \
"

# Setup Notify
## Create rabbitmq vhost
exec_container rabbitmq "rabbitmqctl add_vhost ${NOTIFY_RABBITMQ_VHOST} && rabbitmqctl set_permissions -p ${NOTIFY_RABBITMQ_VHOST} ${RABBITMQ_USER} '.*' '.*' '.*'"
## Setup container
exec_container_as notify-api-php "bin/setup.sh" app

# Setup Databox
## Create rabbitmq vhost
exec_container rabbitmq "rabbitmqctl add_vhost ${DATABOX_RABBITMQ_VHOST} && rabbitmqctl set_permissions -p ${DATABOX_RABBITMQ_VHOST} ${RABBITMQ_USER} '.*' '.*' '.*'"
Expand Down
4 changes: 1 addition & 3 deletions bin/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set -ex
export APP_ENV=test
export XDEBUG_ENABLED=0
export VERIFY_SSL=false
export COMPOSE_PROFILES=db,uploader,report,databox,expose,notify
export COMPOSE_PROFILES=db,uploader,report,databox,expose

docker compose up -d

Expand All @@ -18,7 +18,6 @@ docker compose run --rm dockerize
SF_SERVICES="
databox-api-php
expose-api-php
notify-api-php
uploader-api-php
"

Expand All @@ -30,7 +29,6 @@ LIBS="
admin-bundle
api-test
auth-bundle
notify-bundle
report-bundle
report-sdk
"
Expand Down
2 changes: 1 addition & 1 deletion bin/vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ SYMFONY_PROJECTS="
databox/api
expose/api
uploader/api
notify/api
"

CLIENT_PROJECTS="
Expand Down Expand Up @@ -43,6 +42,7 @@ lib/js/core
lib/js/i18n
lib/js/liform-react
lib/js/navigation
lib/js/notification
lib/js/phrasea-ui
lib/js/react-auth
lib/js/react-form
Expand Down
8 changes: 0 additions & 8 deletions configs/config.dist.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@
}
}
},
"notify": {
"admin": {
"logo": {
"src": "https://www.phraseanet.com/wp-content/uploads/2014/05/PICTO_PHRASEANET.png",
"with": "80px"
}
}
},
"expose": {
"admin": {
"logo": {
Expand Down
4 changes: 0 additions & 4 deletions configurator/config/packages/doctrine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ doctrine:
<<: *doctrine_commons
url: '%env(resolve:EXPOSE_DATABASE_URL)%'

notify:
<<: *doctrine_commons
url: '%env(resolve:NOTIFY_DATABASE_URL)%'

uploader:
<<: *doctrine_commons
url: '%env(resolve:UPLOADER_DATABASE_URL)%'
Expand Down
1 change: 0 additions & 1 deletion configurator/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ services:
array $symfonyApplications:
- databox
- expose
- notify
- uploader
array $frontendApplications:
- databox
Expand Down
5 changes: 0 additions & 5 deletions configurator/src/Command/Migration20230807Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,6 @@ public function execute(InputInterface $input, OutputInterface $output): int
'user_id',
],
],
'notify' => [
'contact' => [
'user_id',
],
],
'uploader' => [
'asset' => [
'user_id',
Expand Down
2 changes: 0 additions & 2 deletions configurator/src/Doctrine/DoctrineConnectionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ public function __construct(
Connection $authConnection,
Connection $databoxConnection,
Connection $exposeConnection,
Connection $notifyConnection,
Connection $uploaderConnection,
) {
$this->connections = [
'auth' => $authConnection,
'databox' => $databoxConnection,
'expose' => $exposeConnection,
'notify' => $notifyConnection,
'uploader' => $uploaderConnection,
];
}
Expand Down
3 changes: 2 additions & 1 deletion dashboard/client/config-compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
'KEYCLOAK_URL',
'MAILHOG_URL',
'MATOMO_URL',
'NOTIFY_API_URL',
'PGADMIN_URL',
'PHPMYADMIN_URL',
'RABBITMQ_CONSOLE_URL',
Expand All @@ -35,6 +34,8 @@
'UPLOADER_CLIENT_URL',
'ZIPPY_URL',
'SOKETI_USAGE_URL',
'NOVU_DASHBOARD_URL',
'NOVU_STUDIO_URL',
];

const e = {};
Expand Down
Loading
Loading