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ị.

 Na-akwado gburugburu gị

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.

Inye njirimara a na-eme ka nghọta Wikimedia Deutschland dịkwuo mma maka otu esi eji Wikibase ma na-enyere anyị aka ime mkpebi ndị ọzọ gbasara ụzọ mmepe. Maka ozi ndị ọzọ, gụọ isiokwu anyị [https://doc.wikimedia.org/Wikibase/master/php/docs_topics_pingback.html pingback documentation).

Aha nnabata








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
Ugbu a ị wụnyela ngwanrọ niile dị mkpa ma hazie faịlụ gburugburu ebe obibi gị, ị nwere otu nhọrọ ọzọ: ma ị ga-eme "'obere ntinye"' (naanị MediaWiki, nchekwa data MySQL na Wikibase) ma ọ bụ "'mgbatị ntinye"' (MediaWiki, data, 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ọ
Ọ bụrụ na ọ dị gị mkpa ịgba ọsọ ọtụtụ ndị na-agba ọsọ, ị nwere ike ịgbakwunye nhọrọ na-esonụ (nke "X" bụ ọnụ ọgụgụ ndị na-arụ ọrụ ị ga-agba ọsọ) na iwu gị nke $ 3, dịka na ihe atụ a:

docker compose up -d --scale wikibase_jobrunner=X



Elu na ịgba ọsọ
Ugbu a ị ga-enwe ọ dịkarịa ala akpa Docker abụọ na-agba ọsọ. Iji hụ akpa gị na-agba ọsọ, gbaa $ 1. Ihe atụ a na-esonụ sitere na ntinye gbasaa:

$ 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



Maka iwu Docker ndị ọzọ na-enyere aka na Wikibase, lelee ngalaba ngwá ọrụ Docker nke akwụkwọ anyị.

Gbanye n'ime Wikibase ọhụrụ gị site na ịnyagharịa na web server nke igwe gị.



Onye na-agba ọsọ ọrụ
Ihe atụ $ 1 na-edozi onye ọrụ raara onwe ya nye nke na-amaliteghachi onwe ya mgbe ọrụ ọ bụla gasịrị, iji hụ na a na-ewere mgbanwe na nhazi ahụ ngwa ngwa o kwere mee.

Ọ bụrụ na ị na-agba ọsọ dị ukwuu, onye ọrụ a nwere ike ọ gaghị enwe ike ịgbaso nhazi. Ị nwere ike ime ka ọ dị ngwa site n'ịbawanye mgbanwe nke $ 1 n'ime faịlụ gị $ 2 (lee n'elu), iji rụọ ọrụ ndị ọzọ n'etiti ịmaliteghachi. Mgbanwe a agaghị arụ ọrụ na onye ọrụ ahụ ruo mgbe ị maliteghachiri ọrụ $ 1 gị.

If you wish, you can also run several job runners in parallel by adding the option  to the   command. Lee ngalaba dị n'elu.

Sitelinks
Iji mepụta njikọ n'etiti MediaWiki na Wikibase, mee edemede add saịtị. Ị nwere ike ịmụtakwu banyere ịgbakwunye sitelinks na Wikidata sitelinks help page na Wikibase advanced nhazi page.



Iji ihe ọhụrụ gị
Ozugbo ọrụ niile malitere, ị nwere ike ịmalite ijupụta, gbasaa ma hazie ihe efu gị nke Wikibase. Lelee ibe anyị [Special:MyLanguage/Wikibase/Setup|setup resources page]] ka ịmalite.



Ịgụ ihe ọzọ

 * Ntuziaka DigitalOcean na docker-compose maka Linux
 * Ntuziaka Microsoft na Docker maka Windows
 * Wikibase Docker wepụtara ọrụ na Phabricator