Comments (9)
I need to have some more info to validate where the problem lies, so I have some questions:
- you installed the plugin via https://dailynomie.github.io/nomie-plugin-api/ => correct?
Then I am wondering how you installed the api server:
- did you install via docker?
- did you use an existing docker image like https://hub.docker.com/repository/docker/rdelange/dailynomie-apiserver/general ?
- or did you setup another way?
from nomie-plugin-api.
you installed the plugin via https://dailynomie.github.io/nomie-plugin-api/ => correct?
Yes
I use docker compose for nomie, CouchDB and API nomie API:
version: '3.1'
services:
nomie6:
image: ghcr.io/qcasey/nomie6-oss:master
restart: unless-stopped
ports:
- ${INTERNAL_IP}:18572:80
nomieapiserver:
image: rdelange/dailynomie-apiserver:latest
container_name: dailynomie-apiserver-docker
volumes:
- ./nomieapiserver_data:/home
ports:
- "${INTERNAL_IP}:1440:1880"
couchdb:
image: couchdb:3
restart: unless-stopped
ports:
- ${INTERNAL_IP}:5984:5984
environment:
- NODENAME=couchdb
- COUCHDB_USER=${COUCH_DB_USER}
- COUCHDB_PASSWORD=${COUCH_DB_PASSWORD}
volumes:
- ./data:/opt/couchdb/data
- ./couchdb.ini:/opt/couchdb/etc/local.d/docker.ini
Then I have nginx configuration to access my nomie, CouchDB, and nomie API server:
server {
set $forward_scheme http;
set $server "INTERNAL_IP";
set $port 1440;
server_name wellness.alexkutsan.me;
location /nomie_db {
proxy_pass http://100.106.66.60:5984;
}
location /ui {
proxy_pass http://100.106.66.60:1440;
}
}
I was trying to setup nomie API server to separate domain, but I receive CORS issue as well, the same CORS issue, when I try to use api.dailynomie.com as nomie API server
I am pretty sure, that if I host a plugin on my domain - the CORS issue should be gone, but I don't know how can I host plugin.
from nomie-plugin-api.
I was trying to create dockerfile for this repo:
FROM node:14-alpine
WORKDIR /app
COPY . /app
RUN npm install
EXPOSE 5000
ENV NODE_ENV=production
CMD ["npm", "start", "--host", "0.0.0.0"]
But it still listening on localhost :
Your application is ready~! 🚀
- Local: http://localhost:5000
- Network: Add `--host` to expose
────────────────── LOGS ──────────────────
And I can't reach it by external IP
from nomie-plugin-api.
Hi,
I have create an docker image for the plugin:
ghcr.io/rdelange/nomie-plugin-api:main
it exposes port 5000.
Can you try using this image, running on your own domain?
You can then install the plugin in Nomie by giving the webaddress to the docker container.
I am curious if this will indeed solve the problem.
Regards,
Ronald
from nomie-plugin-api.
Added to compose:
nomie_api_plugin:
image: ghcr.io/rdelange/nomie-plugin-api:main
ports:
- 100.106.66.60:5000:5000
But the plugin is not full loaded :
from nomie-plugin-api.
Apologies, I made an error in the image.
I have corrected that now. Can you try it again? make sure to delete the old image locally first so it will fetch the new one
from nomie-plugin-api.
Thank you for your efforts!
There is still an issue.
To avoid the CORS issue - I should use the same hostname as nomie, so I need to host it by other path /nomie-plugin-api
But ghcr.io/rdelange/nomie-plugin-api:main host plugin by root math, and I can't host it that way on the same domain as nomie. How to make it available by /nomie-plugin-api
subpath?
from nomie-plugin-api.
Hi,
I am not sure if this is a issue not having Nomie ad the Plugin running on the same domain as technically speaking, Nomie and the Plugin are not communicating in a 'server' - 'client' way, but the are communicating directly, in browser, via an Iframe message bus.
Can you please explain me more precise when the cors issue is happening in the process?
- You have Nomie running
- You load the plugin in nomie via plugindomain:5000
- The plugin gets loaded and you can open the plugin
- in the plugin settings you try to fetch the API
I assume that you get the error at step 4? That is the communication between the API server and the Plugin which takes place totally outside the Nomie App (technically)
from nomie-plugin-api.
I took the liberty to test with your domain. Something strange is happening as I was able to:
- install the plugin via: https://dailynomie.github.io/nomie-plugin-api/
- get an API key via api.dailynomie.com
So it is working. From experience I know that sometimes working within your own network, behind your own router can give unexpected results.
You might try to see if it is working if you connect to your Nomie server from outside your own network (for example via a 4g connection on your phone)
from nomie-plugin-api.
Related Issues (2)
- API down ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nomie-plugin-api.