Git Product home page Git Product logo

citizen-wiki's Introduction

星际公民中文百科

这里是星际公民中文百科的项目地址,基于 Mediawiki 运行。

生产环境(main 分支)地址:https://citizenwiki.cn/

部署

该项目部署在 Railway.app 上,以下是 nixpacks 未交付前临时使用的 Build & Start 命令。

Build:

cd /app/extensions/TemplateStyles &&  composer update --no-dev &&  cd /app/extensions/AWS &&  composer update --no-dev

Start:

sudo chmod -R 755 /app/extensions && perl /assets/prestart.pl /app/nginx.template.conf /nginx.conf && (php-fpm -y /assets/php-fpm.conf & nginx -c /nginx.conf)

服务变量

所有服务变量都需要在项目部署前于 Railway / 本地 .env 文件填写(php_debug_config & wiki_debug_config 定义后可留空)。删除所有 # 注释。

DbName=example 
#Database name

DbPassword=example
#Database password

DbServer=address:port
#Database address with port

DbType=mysql
#Database type

DbUser=root
#Database username

SecretKey=example
#Mediawiki generated secret Key

Server=https://${{RAILWAY_STATIC_URL}}
#Site public address

SiteName=星际公民中文百科
#Site name

UpgradeKey=example
#Mediawiki generated upgrade Key

S3Key=example
#AWS Plugin S3 bucket key

S3Secret=example
#AWS Plugin S3 bucket secret

S3Region=auto
#AWS Plugin S3 bucket region

S3BucketName=citizen-wiki-data
#AWS Plugin S3 bucket name

S3BucketDomain=https://files.citizenwiki.cn
#AWS Plugin S3 bucket domain

S3Endpoint=https://faa2b62743f9b25377c56a98ec6da7e0.r2.cloudflarestorage.com
#AWS Plugin S3 bucket endpoint

php_debug_config= #自定义
wiki_debug_config= #自定义

citizen-wiki's People

Contributors

fierce-cat avatar leonray297 avatar cxjuice avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

citizen-wiki's Issues

AWS Plugin Error

When saving pages
Fatal error: Declaration of MWCallbackStream::write($string) must be compatible with Psr\Http\Message\StreamInterface::write(string $string): int in /app/includes/http/MWCallbackStream.php on line 49

FastCGI Connection Error

2023/04/24 01:51:45 [error] 28#28: *3134 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.0.2, server: localhost, request: "GET /w/index.php?title=FirmWear_SoundGuard&variant=zh-cn HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "citizenwiki.cn"
192.168.0.2 - - [24/Apr/2023:01:51:45 +0000] "GET /w/index.php?title=FirmWear_SoundGuard&variant=zh-cn HTTP/1.1" 404 27 "-" "Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; [email protected])"
2023/04/24 01:51:45 [error] 28#28: *3136 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.0.2, server: localhost, request: "GET /w/index.php?title=FirmWear_SoundGuard&variant=zh-cn HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "citizenwiki.cn"
192.168.0.2 - - [24/Apr/2023:01:51:45 +0000] "GET /w/index.php?title=FirmWear_SoundGuard&variant=zh-cn HTTP/1.1" 404 27 "-" "Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; [email protected])"
2023/04/24 01:51:45 [error] 28#28: *3138 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.0.4, server: localhost, request: "GET /w/index.php?title=FirmWear_SoundGuard&variant=zh-cn HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "citizenwiki.cn"
192.168.0.4 - - [24/Apr/2023:01:51:45 +0000] "GET /w/index.php?title=FirmWear_SoundGuard&variant=zh-cn HTTP/1.1" 404 27 "-" "Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; [email protected])"
2023/04/24 01:51:45 [error] 28#28: *3140 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.0.4, server: localhost, request: "GET /w/index.php?title=FirmWear_SoundGuard&variant=zh-cn HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "citizenwiki.cn"

DynamicPageList3 Error

https://citizen-wiki-debug.up.railway.app/%E5%9C%B0%E7%82%B9

[5110e837baa9aa02ef225017] /%E5%9C%B0%E7%82%B9 Error: Class "MediaWiki\Extension\DynamicPageList3\Lister\Lister" not found

Backtrace:

from /app/extensions/DynamicPageList3/includes/Parse.php(261)
#0 /app/extensions/DynamicPageList3/includes/Hooks.php(276): MediaWiki\Extension\DynamicPageList3\Parse->parse(string, Parser, NULL, NULL, boolean)
#1 /app/includes/parser/Parser.php(3443): MediaWiki\Extension\DynamicPageList3\Hooks::dplParserFunction(Parser, string, string, string, string, string, string, string, string, string)
#2 /app/includes/parser/Parser.php(3126): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)
#3 /app/includes/parser/PPFrame_Hash.php(276): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#4 /app/includes/parser/PPTemplateFrame_Hash.php(97): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#5 /app/includes/parser/Parser.php(3314): PPTemplateFrame_Hash->cachedExpand(string, PPNode_Hash_Tree)
#6 /app/includes/parser/PPFrame_Hash.php(276): Parser->braceSubstitution(array, PPFrame_Hash)
#7 /app/includes/parser/Parser.php(2955): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#8 /app/includes/parser/Parser.php(1610): Parser->replaceVariables(string)
#9 /app/includes/parser/Parser.php(724): Parser->internalParse(string)
#10 /app/includes/content/WikitextContentHandler.php(301): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#11 /app/includes/content/ContentHandler.php(1721): WikitextContentHandler->fillParserOutput(WikitextContent, MediaWiki\Content\Renderer\ContentParseParams, ParserOutput)
#12 /app/includes/content/Renderer/ContentRenderer.php(47): ContentHandler->getParserOutput(WikitextContent, MediaWiki\Content\Renderer\ContentParseParams)
#13 /app/includes/Revision/RenderedRevision.php(266): MediaWiki\Content\Renderer\ContentRenderer->getParserOutput(WikitextContent, Title, integer, ParserOptions, boolean)
#14 /app/includes/Revision/RenderedRevision.php(237): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)
#15 /app/includes/Revision/RevisionRenderer.php(221): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string, array)
#16 /app/includes/Revision/RevisionRenderer.php(158): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)
#17 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)
#18 /app/includes/Revision/RenderedRevision.php(199): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)
#19 /app/includes/poolcounter/PoolWorkArticleView.php(91): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#20 /app/includes/poolcounter/PoolWorkArticleViewCurrent.php(97): PoolWorkArticleView->renderRevision()
#21 /app/includes/poolcounter/PoolCounterWork.php(162): PoolWorkArticleViewCurrent->doWork()
#22 /app/includes/page/ParserOutputAccess.php(299): PoolCounterWork->execute()
#23 /app/includes/page/Article.php(714): MediaWiki\Page\ParserOutputAccess->getParserOutput(WikiPage, ParserOptions, MediaWiki\Revision\RevisionStoreRecord, integer)
#24 /app/includes/page/Article.php(528): Article->generateContentOutput(User, ParserOptions, integer, OutputPage, array)
#25 /app/includes/actions/ViewAction.php(78): Article->view()
#26 /app/includes/MediaWiki.php(542): ViewAction->show()
#27 /app/includes/MediaWiki.php(322): MediaWiki->performAction(Article, Title)
#28 /app/includes/MediaWiki.php(904): MediaWiki->performRequest()
#29 /app/includes/MediaWiki.php(562): MediaWiki->main()
#30 /app/index.php(50): MediaWiki->run()
#31 /app/index.php(46): wfIndexMain()
#32 {main}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.