Page MenuHomePhabricator

SPARQL service returns entities with broken URLs - IP address instead of hostname
Open, Needs TriagePublic

Description

By using docker-compose and the yml from https://github.com/wmde/wikibase-docker/blob/master/docker-compose.yml I managed to install a local wikibase at my IP http://192.168.99.100:8181, and a Query Service at http://192.168.99.100:8282.
(I'm on a Windows 10 Home Edition machine, so I'm using Docker Toolbox - https://docs.docker.com/toolbox/toolbox_install_windows/). The IP address was handed out by the Toolbox

So far so good, after adding 1 property to the wikibase, (P1, instance of) and running SELECT * WHERE {?x ?y ?z} I get results like <http://wikibase.svc/entity/P1> where I much rather would have <http://192.168.99.100:8181/entity/P1>, so that I can click on that link tot see the item in the Wikibase

So this seems to be a very similar issue to https://phabricator.wikimedia.org/T207133, but in this case I only have an IP address (192.168.99.100) and no hostname.

In the yml file I replaced the 'WIKIBASE_HOST=wikibase.svc' with 'WIKIBASE_HOST=192.168.99.100' and also added that IP to the default network aliases.

This does not work, the query service return 0 results, or even server errors

Here's my full yml:

version: '3'

services:

wikibase:
  image: wikibase/wikibase:1.32-bundle
  links:
    - mysql
  ports:
  # CONFIG - Change the 8181 here to expose Wikibase & MediaWiki on a different port
   - "8181:80"
  volumes:
    - mediawiki-images-data:/var/www/html/images
    - quickstatements-data:/quickstatements/data
  depends_on:
  - mysql
  - elasticsearch
  restart: on-failure
  networks:
    default:
      aliases:
       - wikibase.svc
       - 192.168.99.100 # CONFIG - Add your real wikibase hostname here, for example wikibase-registry.wmflabs.org
  environment:
    - DB_SERVER=mysql.svc:3306
    - MW_ELASTIC_HOST=elasticsearch.svc
    - MW_ELASTIC_PORT=9200
    # CONFIG - Change the default values below
    - MW_ADMIN_NAME=*****
    - MW_ADMIN_PASS=*****
    - MW_ADMIN_EMAIL=****@gmail.com
    - MW_WG_SECRET_KEY=*****
    # CONFIG - Change the default values below (should match mysql values in this file)
    - DB_USER=wikiuser
    - DB_PASS=sqlpass
    - DB_NAME=my_wiki
    - QS_PUBLIC_SCHEME_HOST_AND_PORT=http://192.168.99.100:9191
mysql:
  image: mariadb:10.3
  restart: always
  volumes:
    - mediawiki-mysql-data:/var/lib/mysql
  environment:
    MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
    # CONFIG - Change the default values below (should match values passed to wikibase)
    MYSQL_DATABASE: 'my_wiki'
    MYSQL_USER: 'wikiuser'
    MYSQL_PASSWORD: 'sqlpass'
  networks:
    default:
      aliases:
       - mysql.svc
wdqs-frontend:
  image: wikibase/wdqs-frontend:latest
  ports:
  # CONFIG - Change the 8282 here to expose the Query Service UI on a different port
   - "8282:80"
  depends_on:
  - wdqs-proxy
  networks:
    default:
      aliases:
       - wdqs-frontend.svc
  environment:
    - WIKIBASE_HOST=192.168.99.100
    - WDQS_HOST=wdqs-proxy.svc
wdqs:
  image: wikibase/wdqs:0.3.0
  volumes:
    - query-service-data:/wdqs/data
  command: /runBlazegraph.sh
  networks:
    default:
      aliases:
       - wdqs.svc
  environment:
    - WIKIBASE_HOST=192.168.99.100
    - WDQS_HOST=wdqs.svc
    - WDQS_PORT=9999
  expose:
    - 9999
wdqs-proxy:
  image: wikibase/wdqs-proxy
  environment:
    - PROXY_PASS_HOST=wdqs.svc:9999
  ports:
   - "8989:80"
  depends_on:
  - wdqs
  networks:
    default:
      aliases:
       - wdqs-proxy.svc
wdqs-updater:
  image: wikibase/wdqs:0.3.0
  command: /runUpdate.sh
  depends_on:
  - wdqs
  - wikibase
  networks:
    default:
      aliases:
       - wdqs-updater.svc
  environment:
   - WIKIBASE_HOST=192.168.99.100
   - WDQS_HOST=wdqs.svc
   - WDQS_PORT=9999
elasticsearch:
  image: wikibase/elasticsearch:5.6.14-extra
  networks:
    default:
      aliases:
       - elasticsearch.svc
  environment:
    discovery.type: single-node
    ES_JAVA_OPTS: "-Xms512m -Xmx512m"
# CONFING, in order to not load quickstatements then remove this entire section
quickstatements:
  image: wikibase/quickstatements:latest
  ports:
   - "9191:80"
  depends_on:
   - wikibase
  volumes:
   - quickstatements-data:/quickstatements/data
  networks:
    default:
      aliases:
       - quickstatements.svc
  environment:
    - QS_PUBLIC_SCHEME_HOST_AND_PORT=http://192.168.99.100:9191
    - WB_PUBLIC_SCHEME_HOST_AND_PORT=http://192.168.99.100:8181
    - WIKIBASE_SCHEME_AND_HOST=http://192.168.99.100
    - WB_PROPERTY_NAMESPACE=122
    - "WB_PROPERTY_PREFIX=Property:"
    - WB_ITEM_NAMESPACE=120
    - "WB_ITEM_PREFIX="

volumes:

mediawiki-mysql-data:
mediawiki-images-data:
query-service-data:
quickstatements-data:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 8 2019, 12:05 PM
Restricted Application added a project: Wikidata. · View Herald TranscriptJul 8 2019, 12:06 PM
OlafJanssen updated the task description. (Show Details)Jul 8 2019, 12:08 PM
OlafJanssen updated the task description. (Show Details)
OlafJanssen updated the task description. (Show Details)Jul 8 2019, 12:10 PM