N
Novu6mo ago
adnanjpg

run locally using docker

I've added a local provider to novu that will be used for our project. I'm able to run the project locally using the 'Run Novu in local machine' guide, but I want to containarize the project and run it on my dev server, but I see there's no guide on how to do this, and no dockerfile that builds clean images of all projects I've tried running this command: pnpm i -f && pnpm run docker:build but is is failing with this error:
apps/ws docker:build: 2.946  ERR_PNPM_WORKSPACE_PKG_NOT_FOUND  In libs/application-generic: "@novu/framework@workspace:*" is in the dependencies but no package named "@novu/framework" is present in the workspace
apps/ws docker:build: 2.946 This error happened while installing a direct dependency of /usr/src/app/libs/application-generic
apps/ws docker:build: 2.946 Packages found in the workspace: root, @novu/ws, @novu/application-generic, @novu/dal, @novu/shared, @novu/testing, @novu/client, @novu/node, @novu/providers, @novu/stateless
apps/ws docker:build: ------
apps/ws docker:build: Dockerfile:32
apps/ws docker:build: --------------------
apps/ws docker:build: 31 |
apps/ws docker:build: 32 | >>> RUN --mount=type=secret,id=BULL_MQ_PRO_NPM_TOKEN,uid=1000 export BULL_MQ_PRO_NP1 | >>> pnpm install --verbose && \
apps/ws docker:build: 34 | >>> pnpm build:ws
apps/ws docker:build: 35 |
apps/ws docker:build: --------------------
apps/ws docker:build: ERROR: failed to solve: process "/bin/sh -c export BULL_MQ_PRO_NPM_TOKEN=$(cat /run/secrets/BULL_MQ_PRO_NPM_TOKEN) && pnpm install --verbose && pnpm build:ws" did not complete successfully: exit code: 1
apps/ws docker:build: Failed
/home/username/novu/apps/ws:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @novu/[email protected] docker:build: `BULL_MQ_PRO_NPM_TOKEN=${BULL_MQ_PRO_NPM_TOKEN} docker buildx build --secret id=BULL_MQ_PRO_NPM_TOKEN -f ./Dockerfile -t novu-ws ./../.. --load $DOCKER_BUILD_ARGUMENTS`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.
apps/ws docker:build: 2.946  ERR_PNPM_WORKSPACE_PKG_NOT_FOUND  In libs/application-generic: "@novu/framework@workspace:*" is in the dependencies but no package named "@novu/framework" is present in the workspace
apps/ws docker:build: 2.946 This error happened while installing a direct dependency of /usr/src/app/libs/application-generic
apps/ws docker:build: 2.946 Packages found in the workspace: root, @novu/ws, @novu/application-generic, @novu/dal, @novu/shared, @novu/testing, @novu/client, @novu/node, @novu/providers, @novu/stateless
apps/ws docker:build: ------
apps/ws docker:build: Dockerfile:32
apps/ws docker:build: --------------------
apps/ws docker:build: 31 |
apps/ws docker:build: 32 | >>> RUN --mount=type=secret,id=BULL_MQ_PRO_NPM_TOKEN,uid=1000 export BULL_MQ_PRO_NP1 | >>> pnpm install --verbose && \
apps/ws docker:build: 34 | >>> pnpm build:ws
apps/ws docker:build: 35 |
apps/ws docker:build: --------------------
apps/ws docker:build: ERROR: failed to solve: process "/bin/sh -c export BULL_MQ_PRO_NPM_TOKEN=$(cat /run/secrets/BULL_MQ_PRO_NPM_TOKEN) && pnpm install --verbose && pnpm build:ws" did not complete successfully: exit code: 1
apps/ws docker:build: Failed
/home/username/novu/apps/ws:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @novu/[email protected] docker:build: `BULL_MQ_PRO_NPM_TOKEN=${BULL_MQ_PRO_NPM_TOKEN} docker buildx build --secret id=BULL_MQ_PRO_NPM_TOKEN -f ./Dockerfile -t novu-ws ./../.. --load $DOCKER_BUILD_ARGUMENTS`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.
5 Replies
Ask Inkeep
Ask Inkeep6mo ago
Hi @adnanjpg, I'm an AI assistant for Novu. While a team member reviews this question, I'll see if I can find relevant sources for your question. ----------------------------- While I generate an answer, here are some sources that might be helpful: * Go SDK * Run Novu in local machine * MacOS/Linux * Add a new provider -----------------------------
Ask Inkeep
Ask Inkeep6mo ago
Answer To run Novu locally using Docker, you can follow these steps based on the available documentation (1) : 1. Before you begin Make sure you have Docker and docker-compose installed on your system. You'll also need Git. 2. Get the code Clone the Novu repository and navigate to the docker community folder:
git clone --depth 1 https://github.com/novuhq/novu
cd novu/docker/community
cp .env.example .env
docker-compose -f docker-compose.yml up
git clone --depth 1 https://github.com/novuhq/novu
cd novu/docker/community
cp .env.example .env
docker-compose -f docker-compose.yml up
3. Configuration Before deploying, make sure to update the .env file with your own secrets. The documentation provides information on required variables and configuration options. However, it seems you're encountering an error when trying to build the Docker images. The error suggests there might be issues with package dependencies or the build process. Unfortunately, I don't have specific information about the pnpm run docker:build command or the exact error you're encountering in the provided documentation. The error seems to be related to missing packages in the workspace and issues with the Dockerfile. Since I can't provide a direct solution based on the available information, I suggest you consider the following: 1. Make sure all dependencies are correctly installed and the workspace is set up properly. 2. Check if there are any recent updates or issues reported in the Novu GitHub repository related to Docker builds. 3. Review the Dockerfile in the apps/ws directory to ensure it's correctly configured. If you continue to face issues, you might want to click on the "Ask for help" button to tag a team member to review your question, as they might have more specific insights into the Docker build process for Novu.
Ask Inkeep
Ask Inkeep6mo ago
Feel free to tag @Ask Inkeep with additional questions. Got it. Tagging @Support for additional help.
adnanjpg
adnanjpgOP6mo ago
here's the full error
Pawan Jain
Pawan Jain6mo ago
@adnanjpg Please use #⚓│community-self-host channel for docker related issye
Want results from more Discord servers?
Add your server