GrampsJS Setup - CORS Error and port change request

Looking at Gramps WebAPi version I see that it is still 0.1 - SO I forcefully used the tag v0.2.1 instead of the latest.

:arrow_forward: node --version = v16.10.0
:arrow_forward: npm --version = 8.0.0
:arrow_forward: chrome = Version 95.0.4638.54 (Official Build) (x86_64)
:arrow_forward: OS = macOS 11.6 (20G165) - Big Sur

Meanwhile, I started from scratch for everything. I will retract all these issues now :slight_smile: It is working.
I am happy to be the beta tester for you web api sync.

PS: Yeah need to use 0.2.1 from docker image. Cannot use latest, goes back to 0.1

Additional Q:
Now, I am planning to get nginx proxy manager point a domain to grampsjs - not the web api. I don’t need to change CORS=* to a specific domain right?

Good you got it working!

It’s strange latest doesn’t work for you, on Docker Hub it’s showing with the same digest as v0.2.1

But I did delete it at some point yesterday when I realized v0.2.0 is erroneous. Perhaps it’s a caching issue.

Now, I am planning to get nginx proxy manager point a domain to grampsjs - not the web api. I don’t need to change CORS=* to a specific domain right?

What are you trying to achieve? If you’re deploying this for use from the public internet (even if only by yourself), I suggest serving Gramps.js from within your Web API container (and the easiest way with v0.2.1 is to just set GRAMPSJS_VERSION=v0.2.0).

The idea is simple. Now that webAPI is maturing and are able to write data. Idea is to make GrampsJS open to my family and a few cousins (creating editor accounts for them to login) to start contributing and building the tree.
Hope that made sense as a use case.

Which means unfortunately I need to deploy this for use from the public internet. However I do not understand what you mean by 'I suggest serving Gramps.js from within your Web API container ’

Do I not need to download grampsjs separately at all? Woah this is all a little blur for me now.

With the new Docker image, you only need to set the GRAMPSJS_VERSION environment variable; if it exists, on container startup it will download Gramps.js and set it up correctly.

I agree this is currently confusing, we need to improve this.

1 Like

Thanks for this David.
I did not know this as I misunderstood the line in the docs.

Hi David,
Sorry for this late reply.

So, I wanted to revisit this as I have the latest version of web-api and also adding the grampsJS using the env variable for the installation.

This is my current setup docker file:

version: "3.7"

    container_name: gramps-webapi
    image: dmstraub/gramps-webapi:v0.2.1
    restart: unless-stopped
      - "5053:5000"
      - TREE="MyFam" # set the name of your family tree
      - SECRET_KEY="The supersercretkeywhich_shouldbesome setcharatctersforaccess" # set your secret key
      - BASE_URL=""
      - GRAMPSJS_VERSION=v0.4.1
      - gramps_users:/app/users
      - gramps_index:/app/indexdir
      - gramps_thumb_cache:/app/thumbnail_cache
      - /volume1/docker/gramps/config/config.cfg:/app/config/config.cfg
      - /volume1/docker/gramps/grampsdb:/root/.gramps/grampsdb
      - /volume1/docker/gramps/gramps_media:/app/media


The API I suppose seems fine. How do I access the - perhaps the login page?
Just using the IPaddress:Port is not working? I am sure I am doing something wrong here.

I changed my configuration yesterday morning to use the GRAMPJS_VERSION variable and also had problems getting to a login screen. I saw a blank screen.

What worked for me, was changing the value of STATIC_PATH variable in the config.cfg file

I change mine to:

After I restarted the gramps_webapi container, I could login.


@ebj075 Absolutely perfect now.
Everything works like a charm…

I opened an issue on github regarding this. If we are using the GRAMPSJS_VERSION variable we should remove the STATIC_PATH variable from config.cfg. I tested this. I removed the variable. Restarted the container and it works great.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.