Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Commit

Permalink
Sync baseconfig on start up
Browse files Browse the repository at this point in the history
Related with #9
  • Loading branch information
lens0021 committed Nov 17, 2019
1 parent 13fc7ab commit 232502c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ ENV NODE_ENV=production
EXPOSE 8000
CMD sed -i 's~MEDIAWIKI_APIS_URI~'"${MEDIAWIKI_APIS_URI:-http://http/api.php}"'~' /srv/parsoid/config.yaml &&\
sed -i 's~MEDIAWIKI_APIS_DOMAIN~'"${MEDIAWIKI_APIS_DOMAIN:-femiwiki.com}"'~' /srv/parsoid/config.yaml &&\
sed -i 's~MEDIAWIKI_APIS_PREFIX~'"${MEDIAWIKI_APIS_PREFIX:-femiwiki}"'~' /srv/parsoid/config.yaml &&\
tools/sync-baseconfig.js --domain "${MEDIAWIKI_APIS_DOMAIN:-femiwiki.com}" --prefix "${MEDIAWIKI_APIS_PREFIX:-femiwiki}" --config &&\
node bin/server.js
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ docker run -p 8000:8000 [-e MEDIAWIKI_APIS_URI=...] [-e MEDIAWIKI_APIS_DOMAIN=..
--|--|--
MEDIAWIKI_APIS_URI | `http://http/api.php` | 위키의 API path. Container 안에서 접근할 수 있는 것이어야 하며 그러므로 별도로 네트워크 설정을 하지 않는다면`localhost/api.php`와 같은 주소는 사용할 수 없습니다.
MEDIAWIKI_APIS_DOMAIN | `femiwiki.com` | 위키의 [LocalSettings.php](https://www.mediawiki.org/wiki/Manual:LocalSettings.php)에서 정의한 `$wgVirtualRestConfig['modules']['parsoid']['domain']`과 동일한 값 ([자세한 설명](https://www.mediawiki.org/wiki/Parsoid/Setup#Configuration))
MEDIAWIKI_APIS_PREFIX | `femiwiki` | [자세한 설명](https://www.mediawiki.org/wiki/Parsoid/Setup#Configuration))

## 빌드

Expand Down
1 change: 1 addition & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ services:
mwApis:
- uri: 'MEDIAWIKI_APIS_URI'
domain: 'MEDIAWIKI_APIS_DOMAIN'
prefix: 'MEDIAWIKI_APIS_PREFIX'
useSelser: true
serverInterface: '0.0.0.0'

0 comments on commit 232502c

Please sign in to comment.