Run dspace on docker issue

573 views
Skip to first unread message

Nagy Ákos

unread,
Feb 1, 2022, 1:00:17 PM2/1/22
to DSpace Community
Hi,

I try to run dspace 7.x on docker.

I follow exactly this steps:

https://dspace-labs.github.io/DSpace-Docker-Images/documentation/run.DSpace7.html

After start, I can open: http://localhost:8080/server/ but the
http://localhost:3000/ can't connect to api (attached).


I try with public api too:

    environment:
      - DSPACE_SSL=false
      - DSPACE_HOST=dspace-angular
      - DSPACE_PORT=3000
      - DSPACE_NAMESPACE=/
      - DSPACE_REST_HOST=api7.dspace.org
      - DSPACE_REST_SSL=true
      - DSPACE_REST_NAMESPACE=/server
      - DSPACE_REST_PORT=443

Same result, the angular UI remain blank, without any data.

In some yaml I got this ENV variables, but can't help:

      - DSPACE_UI_SSL=false
      - DSPACE_UI_HOST=dspace-angular
      - DSPACE_UI_PORT=4000
      - DSPACE_UI_NAMESPACE=/
      - DSPACE_REST_HOST=api7.dspace.org
      - DSPACE_REST_SSL=true
      - DSPACE_REST_NAMESPACE=/server
      - DSPACE_REST_PORT=443


Someone can give me a working docker-compose file configured for public API.


--
Nagy Ákos
Screenshot from 2022-02-01 19-55-25.png

Tim Donohue

unread,
Feb 1, 2022, 1:48:57 PM2/1/22
to DSpace Community
Hello, 

Those instructions you were following are outdated & obsolete (I didn't realize they were still posted, so I've just taken them offline).

Instead, please follow the Docker instructions at https://wiki.lyrasis.org/display/DSPACE/Running+DSpace+7+with+Docker 

Tim

Nagy Ákos

unread,
Feb 2, 2022, 10:20:08 AM2/2/22
to dspace-c...@googlegroups.com

Thanks,

with new instruction I can run dspace7.

--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-communi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-community/9bb60609-9605-4044-a9f3-1ae13b24a08bn%40googlegroups.com.
-- 
Nagy Ákos
libreoffice.ro

Nagy Ákos

unread,
Feb 7, 2022, 2:51:02 AM2/7/22
to dspace-c...@googlegroups.com

I want to run the rest api and the ui behind traefik proxy.

Because the ui run on localhost, I got a Header error.

How can I enable --disableHostCheck flag for angular?

The single way that I found, is to modify the serve.ts and mount it in docker:

volumes:

- ./serve.ts:/app/scripts/serve.ts

Can I enable it with environment variables?

Tim Donohue

unread,
Feb 7, 2022, 10:48:11 AM2/7/22
to DSpace Community
Hi Nagy,

I believe you can add that flag directly in the `angular.json` instead, if you wish.  See this StackOverflow answer: https://stackoverflow.com/a/57461591

I'm not aware of any way to set this as an environment variable at this time.   Keep in mind this sort of setup is not recommended for production obviously.

Tim

Nagy Ákos

unread,
Dec 19, 2022, 2:11:02 AM12/19/22
to dspace-c...@googlegroups.com

Hi,

finally I can made a working dspace 7 with https behind traefik:

https://github.com/akoscomp/dspace-docker-traefik


I don't find an optimal way to set the --disableHostCheck flag, finally I mount the updated serve.ts in container.

Reply all
Reply to author
Forward
0 new messages