Page MenuHomePhabricator

URIs returned by Query Service contain docker network name
Closed, ResolvedPublic

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Addshore closed this task as Invalid.EditedJun 20 2018, 11:06 AM
Addshore subscribed.

This is down to the configuration, for example on the wikibase registry correct URLs are shown using the docker images.

Screenshot_20180620-130726.png (1×1 px, 228 KB)

Here is the docker-compose section for the wikibase-registry wdqs updater:

wdqs-updater:
  image: wikibase/wdqs:0.3.0
  restart: always
  command: /runUpdate.sh
  depends_on:
  - wdqs
  - wikibase
  environment:
    WIKIBASE_HOST: wikibase-registry.wmflabs.org

If you change this URL you'll have to reload all of the data

Is the WIKIBASE_HOST variable used for both communication with Wikibase and the URI prefix?

I think that in the frame of this docker compose install, it is unlikely that a user would want to point to another Wikibase host, but might want to just configure the prefix. This seems important when switching from staging to production.

So the "hack" that we have for the wikibase-registry is adding the following to the mediawiki service:

networks:
  default:
    aliases:
     - wikibase.svc
     - wikibase-registry.wmflabs.org

Is the WIKIBASE_HOST variable used for both communication with Wikibase and the URI prefix?

Yes

I think that in the frame of this docker compose install, it is unlikely that a user would want to point to another Wikibase host, but might want to just configure the prefix. This seems important when switching from staging to production.

Some peoples use cases do actually want to do this.
Would 2 env vars firs this for you? or is the network alias suitable?

Addshore triaged this task as Medium priority.Jun 26 2018, 4:08 PM
Vvjjkkii renamed this task from URIs returned by Query Service contain docker network name to 5naaaaaaaa.Jul 1 2018, 1:02 AM
Vvjjkkii changed the task status from Stalled to Open.
Vvjjkkii raised the priority of this task from Medium to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from 5naaaaaaaa to URIs returned by Query Service contain docker network name.Jul 2 2018, 1:29 PM
CommunityTechBot changed the task status from Open to Stalled.
CommunityTechBot lowered the priority of this task from High to Medium.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.

What hast worked is setting WIKIBASE_HOST in the docker-compose file to the actual public hostname and in the Wikibase's LocalSettings.php adding an explicit concep URI prefix with http protocol, like $wgWBRepoSettings['conceptBaseUri'] = "http://staging.catalog.rhizome.org/";

despens claimed this task.