12 Replies
@balance, you just advanced to level 1!
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
https://github.com/novuhq/novu/tree/main/docker teh readme here is outdated, the docker compose command won't work like that.
Also the reason I ask about why we move the env file is: We don't provide a context, so
.
is the context, so the .env file we copy is never used. Or am I missing something?
resp. it's the readme for the main branch yet the git clone command clones the next branch.next
branch is the default branch where all the work is being merged. It is the branch deployed in our Dev environment but not in Production. It is discouraged to use the next
branch into a Production environment. main
branch used to be the branch with the functionality that next
branch has now.
Please open an issue for fixing the documentation if you think that is misleading how is explained right now.
Which docker compose file are you trying to run from the 2 folders we have? Also to add that the Docker and K8s implementation is community driven so we can't offer full support unfortunately.I just try to get the API working. I follow the README on the github. Meaning:
The API endpoint keeps giving me a 401 which isn't surprising, since apparently the host it uses is
'Host', 'api.novu.co'
? Althought none of the env vars in the container define that.api.novu.co
is the fallback URL for the Notification Center and the CLI tool when the URL is not provided. I can only think in the first one being used by you, but I might be wrong, so let me try to get more information of what you are doing.
Are you running the docker compose file from /docker/local/development/docker-compose.development.yml
?<partly solved> Ah, interesting, thanks for that info! So chances are, I'm doing something simple wrong. Here's what I do (I pruned everything for a clean slate):
1.
[email protected]:novuhq/novu.git
=> using the next
branch.
2. Following the readme on https://github.com/novuhq/novu/tree/next/docker
2.1 cd novu/docker
2.2 cp .env.example ./local/deployment/.env
2.3 docker-compose -f ./local/deployment/docker-compose.yml up
(again, step 2.2 is to my knowledge useless since 2.3 uses a different context, might be wrong though, doesn't matter anyway)
Result: localhost:4200 works
3. I sign out because it seems I still have a login session cache.
4. I sign in again (I didn't prune the volumes)
5. I run curl -d "@user.json" -H "Authorization: ApiKey e0dc75817c0770773f66d990398d9ba2" -H "Content-Type: application/json" -X POST http://localhost:3000/v1/subscribers
6. works
7. I do a similar curl to /events/trigger and while I get errors because my payload isn't correct, it does communicate with the locally running API.
8. So if I try what I did before, using a js file, I get the issue with the fallback host. So I guess, my js is bad:
I changed it a bit, compare it to https://docs.novu.co/api/trigger-event/ so I can run it as a simple script.
So I guess my problem is kinda solved and my JS skills just suck.If you share your JS file implementation I can try to help you to spot the problem. But I am glad that as a script it works. I am sure your JS skills are not that bad. π
A small question, regarding the trigger, did you tried passing the config object as stated here: https://docs.novu.co/overview/docker-deploy#triggering-events-with-custom-installation ? because the defaults goes to the cloud version when not passed π
I might if I'm not able to solve it. THanks
@balance, you just advanced to level 2!
thanks! I remember that I saw some config warning but figured it's some default thing that has nothing to do with Novu directly. I'll check it out