Setting up Graphryder API with new dataset


#41

Yes.

I’m working on the graphryder repo.

I’ve run build and am serving the dist directory with nginx. I have never used ansible. If possible, could you post a few lines on how you set it up?


#42

Have you had time to have a look at this @luca_mearelli?


#43

Hi hugi, I hadn’t have time to look into this yet, I may today/tomorrow and I’ll write up documentation on how I was doing the depoloyment (but Ansible is really just a way to automate the copying of the dist directory to the remote server)


#44

Hi, I have tried to understand what is wrong with the site anche why it doesnt’ show the sliders correctly but I actually couldn’t find anything wrong …

About the deploy procedure: what the ansible playbook does is simply this:

  1. it uploads the content of the dist directory to a directory on the server
  2. it generates a config.js file on the server with the right api URL
  3. it links the directory on the server as the document root of the nginx running on the server

It assumes that the dist directory contains the built application which I do with

npm run build

So nothing different from what you do.

I’ve also tried connecting to the same API server you do and I tried also running the project locally with nginx (via docker) using this command:

docker run --name graphryder-nginx -v /Code/graph-ryder-dashboard/dist:/usr/share/nginx/html:ro --rm -p 9998:80 -d nginx

then opening http://localhost:9998 shows the dashboard and the slider is working.

The only substantial difference is that the site is hosted on a non-https resource… can you have it configured with a domain name and an SSL cert?
I wanted to test deploying the code somewhere else but all the options I have available are https-only (netlify, zeit) and the app served over https won’t be able to access the API at 157.230.106.58:5000


#45

Ok, let’s try that. It seems really strange for that to affect the CSS though.

But to do this I need @matthias, who handles the domain and certs of the edgeryders.eu domain.
We need to set up the API now running at http://157.230.106.58:5000 to get an https certificate like the API at https://graphryder.edgeryders.eu/api/. How do we proceed @matthias?


#46

it is strange indeed, but it’s not an issue with CSS, rather it’s an issue with the slider not getting properly initialized (but no js errors are shown …)


#47

I made a new subdomain graphryder2.edgeryders.eu for you and pointed it to the 157.230.106.58 server. Means, now you’ll be able to obtain a SSL certificate from LetsEncrypt by yourself for that domain.

They have some command line tools etc. for that. Some servers or their control panels have dedicated support for LetsEncrypt already. I don’t know what server you have so I can’t help more right now.