Wikibase/Docker/ig

Nchịkọta


Nke a bụ ntuziaka nzọụkwụ site na iji Docker wụnye Wikibase Suite na kọmputa nke gị.

Onyonyo Docker anyị nwere nrụnye MediaWiki na Wikibase zuru oke, yana usoro nrụnye nwere ike ịhazi ya ka ọ dabara mkpa gị.

Preparing your environment
Mezue nzọụkwụ ndị a niile tupu ịmalite itinye Wikibase.



Ntinye Docker
Na kọmputa ebe ị chọrọ ịgba ọsọ Wikibase, bu ụzọ tinye Docker.

Ọ bụrụ na ị chọrọ enyemaka ịwụnye karịa Docker's own instructions, ị nwere ike ịlele nkuzi ndị a maka Linux, Mac na Windows.



Lelee faịlụ
Lelee ebe nchekwa pipeline Wikibase site na GitHub iji nweta faịlụ nhazi ihe atụ. Ntinye ọhụrụ bụ $ 1, yabụ na-agba iwu ndị a:

git clone https://github.com/wmde/wikibase-release-pipeline cd wikibase-release-pipeline git checkout tags/wmde.13



Kwadebe faịlụ gị
Mepụta akwụkwọ ndekọ aha mmalite ọhụrụ nke ị ga-esi malite Docker. Buru n'uche aha nke ndekọ ahụ ga-apụta na aha akpa Docker gị. Maka ọmụmaatụ a, anyị ga-emepụta ndekọ aha "wbdocker'".

mkdir $HOME/wbdocker cp -r example/* $HOME/wbdocker cd $HOME/wbdocker mv template.env .env



Mee ka gburugburu ebe obibi gị dị iche iche
faịlụ $ 1 nwere mgbanwe gburugburu ebe obibi nke na-achịkwa ntinye Wikibase gị. Ị ga-adị mkpa idezi faịlụ a ma gbanwee ozi na ahịrị ụfọdụ dị ka ndị a:



MediaWiki Nhazi

 * MW_ADMIN_NAME
 * MW_ADMIN_PASS
 * MW_ADMIN_EMAIL

Ụkpụrụ ndị a na-akọwa aha onye ọrụ, paswọọdụ na adreesị ozi-e nke onye ọrụ nchịkwa na ntinye MediaWiki ọhụrụ gị. Ị ga-eji aha njirimara na paswọọdụ a banye na interface weebụ nke ihe ọhụrụ gị maka oge mbụ; adreesị ozi-e ị na-abanye ebe a ga-enyekwa gị ohere ịmegharị paswọọdụ gị ma ọ bụrụ na ọ dị mkpa.



Igodo nzuzo a kwesịrị ịbụ ihe pụrụ iche; MediaWiki na-eji ya maka ọtụtụ ebumnuche (dịka, njikwa nnọkọ, isi iyi entropy cryptographic). Hụ njikọ maka ozi ndị ọzọ. Iji mepụta eriri na-enweghị isi maka iji na faịlụ a:

echo -n "MW_SECRET_KEY=" tr -dc 'A-Za-z0-9@#%^+_-' 

Nhazi Database

 * DB_NAME
 * DB_USER
 * DB_PASS

Ụkpụrụ ndị a na-achịkwa aha nchekwa data nke MediaWiki ga-eji, yana aha njirimara nchekwa data na paswọọdụ. Na nke kacha nta, gbanwee :

echo -n "DB_PASS=" tr -dc 'A-Za-z0-9@#%^+_-' 

Wikibase Nhazi

 * WIKIBASE_PINGBACK=false

Site na ndabara, a na-egbochi njirimara Wikibase pingback. Biko tụlee ime ka njirimara a (nke na-eziga naanị data a na-amaghị aha ya) site na ịgbanwe $ 1 na $ 2.

Enabling this feature significantly improves Wikimedia Deutschland's insight into how Wikibase is being used and helps us make more informed decisions regarding the development roadmap. For more information, read our pingback documentation topic.

Hostnames








Ahịrị ndị a na-akọwa aha onye ọbịa na ọdụ ụgbọ mmiri nke Wikibase gị (ihe ị ga-etinye na adreesị ihe nchọgharị gị) na, nhọrọ, nke ọrụ mpụga maka ntinye $ 1 proli.

"'Ndị ọrụ sandbox (ndị chọrọ naanị nhazi dị n'ógbè na otu kọmputa) nwere ike ma kwesị ịhapụ ngalaba a n'emetụghị ya aka. "'

Otú ọ dị, ọ bụrụ na ị na-eme atụmatụ iji ọrụ ọ bụla dị n'elu n'èzí nke Docker nke onwe ya, ị ga-etinye $ 1, $ 2, $ 3 na / ma ọ bụ $ 4 na aha ndị ọbịa ọha na eze - ya bụ, aha ndị ọbịa nwere ike idozi na DNS - ma ọ bụ adreesị IP. Nke ikpeazụ nwere ike ịbụ nhọrọ ziri ezi ma ọ bụrụ na ị na-agba ọsọ nke a na netwọk mpaghara.

MAX_JOBS
Ị nwere ike ịkọwapụta na onye na-agba ọsọ nke $ 1 ga-arụ ọrụ ndị ọzọ n'etiti ịmaliteghachi site na ịtọ $ 2 karịa uru ndabara ya nke "1". Lee n'okpuru ebe a maka ozi ndị ọzọ gbasara onye na-agba ọsọ.



Ịtinye na ịgba ọsọ Wikibase
Now that you've installed all the needed software and customised your environment file, you have one more choice: whether to perform a minimal install (just MediaWiki, a backing MySQL database and Wikibase) or an extended install (MediaWiki, database, Wikibase, WDQS, Elasticsearch, QuickStatements).



Ntinye dị ala
Maka obere ntinye, na "'launch directory'" ebe ị depụtaghachiri ma gbanwee faịlụ gị, na-agba ọsọ:

docker compose up -d



Ntinye gbasaa
Maka ntinye gbasaa, na "'launch directory'" ebe ị depụtaghachiri ma gbanwee faịlụ gị, mee iwu a gbasaa:

docker compose -f docker-compose.yml -f docker-compose.extra.yml up -d

Nhọrọ
If you need to run multiple job runners, you can add the following option (with X being the number of job runners to run) onto your  command, as in this example:

docker compose up -d --scale wikibase_jobrunner=X

Up and running
You will now have at least two Docker containers running. To see your running containers, run. The following example output is from an extended install:

$ docker compose ps NAME                        COMMAND                   SERVICE              STATUS              PORTS wbdocker-elasticsearch-1       "/usr/local/bin/dock…"    elasticsearch        running             9300/tcp wbdocker-mysql-1               "docker-entrypoint.s…"    mysql                running             3306/tcp wbdocker-quickstatements-1     "/bin/bash /entrypoi…"    quickstatements      running             0.0.0.0:8840->80/tcp, :::8840->80/tcp wbdocker-wdqs-1                "/entrypoint.sh /run…"    wdqs                 running             9999/tcp wbdocker-wdqs-frontend-1       "/entrypoint.sh ngin…"    wdqs-frontend        running             0.0.0.0:8834->80/tcp, :::8834->80/tcp wbdocker-wdqs-proxy-1          "/bin/sh -c \"/entryp…"   wdqs-proxy           running             80/tcp wbdocker-wdqs-updater-1         "/entrypoint.sh /run…"    wdqs-updater         running             wbdocker-wikibase-1             "/bin/bash /entrypoi…"    wikibase             running             0.0.0.0:80->80/tcp, :::80->80/tcp wbdocker-wikibase_jobrunner-1   "/bin/bash /jobrunne…"    wikibase_jobrunner   running             80/tcp



For some more helpful Wikibase-oriented Docker commands, check out the Docker tooling section of our maintenance documentation.

Log into your new Wikibase by navigating to your local machine's web server.

Job runner
The example  sets up a dedicated job runner which restarts itself after every job, to ensure that changes to the configuration are picked up as quickly as possible.

If you run large batches of edits, this job runner may not be able to keep up with edits. You can speed it up by increasing the MAX_JOBS variable in your  file (see above), in order to run more jobs between restarts. This change won't take effect in the job runner until you restart your  project.

If you wish, you can also run several job runners in parallel by adding the option  to the   command. See the Installing section above.

Sitelinks
To create links between MediaWiki and Wikibase, run the add site script. You can learn more about adding sitelinks on the Wikidata sitelinks help page and the Wikibase advanced configuration page.

Using your new instance
Once all services have started, you can begin filling up, extending and customising your empty instance of Wikibase. Take a look at our setup resources page to get started.