Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P17260
environment
Archived
Public
Actions
Authored by
zeljkofilipin
on Sep 10 2021, 11:44 AM.
Edit Paste
Activate Paste
View Raw File
Subscribe
Mute Notifications
Tags
None
Referenced Files
F34639149: environment
Sep 10 2021, 11:44 AM
2021-09-10 11:44:14 (UTC+0)
Subscribers
None
~$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.7
BuildVersion: 19H1323
~$ docker --version
Docker version 20.10.8, build 3967b7d
~$ docker-compose --version
Docker Compose version v2.0.0-rc.2
~/Documents/cxserver$ cat config.yaml
# Number of worker processes to spawn.
# Set to 0 to run everything in a single process without clustering.
# Use ncpu to run as many workers as there are CPU units
num_workers: 0
# Log error messages and gracefully restart a worker if v8 reports that it
# uses more heap (note: not RSS) than this many megabytes.
worker_heap_limit_mb: 250
# Logger info
logging:
level: trace
streams:
- type: stdout # log to stdout
named_levels: true # emit log level name instead of index. e.g. INFO vs 30
# # Use gelf-stream -> logstash
# - type: gelf
# host: logstash1003.eqiad.wmnet
# port: 12201
# Statsd metrics reporter
metrics:
#type: log
#host: localhost
#port: 8125
ratelimiter:
type: memory
services:
- name: cxserver
# a relative path or the name of an npm package, if different from name
module: ./app.js
# optionally, a version constraint of the npm package
# version: ^0.4.0
# per-service config
conf:
port: 8080
# private_key: path to private key file for enabling https
# certificate: path to certificate file for enabling https
# interface: localhost # uncomment to only listen on localhost
# More per-service config settings
# The location of the spec, defaults to spec.yaml if not specified
# spec: ./spec.yaml
# allow cross-domain requests to the API (default *)
cors: '*'
# to disable use:
# cors: false
# to restrict to a particular domain, use:
# cors: restricted.domain.org
# URL of the outbound proxy to use (complete with protocol)
# proxy: http://my.proxy.org:8080
# the list of domains for which not to use the proxy defined above
# no_proxy_list:
# - domain1.com
# - domain2.org
user_agent: cxserver
# Mediawiki host name. Example {lang}.wikisource.org which get expanded internally to
# es.wikisource.org in a spanish language context.
# Do not prefix with http or https://
# mw_host: '{lang}.wikipedia.org'
mwapi_req:
body: "{{request.body}}"
query: "{{ default(request.query, {}) }}"
headers:
host: "{{request.params.domain}}"
user-agent: "{{user-agent}}"
method: post
uri: "https://{{domain}}/w/api.php"
restbase_req:
method: '{{request.method}}'
uri: https://{{domain}}/api/rest_v1/{+path}
query: '{{ default(request.query, {}) }}'
headers: '{{request.headers}}'
body: '{{request.body}}'
jwt:
secret: ''
algorithms:
- HS256
ratelimiter_key: x-client-ip # The request header field that uniquely identify a request source
ratelimiter_rate: 10
languages: config/languages.yaml
templatemapping:
database: config/templatemapping.db
sectionmapping:
database: config/cx-section-titles-aligned.db
mt:
Apertium:
api: https://apertium.wmflabs.org
# For packaging reasons use separate configuration
languages: config/Apertium.yaml
Elia:
api: https://mt-api.elhuyar.eus/translate_string
languages: config/Elia.yaml
key: null
apiId: null
Google:
api: https://www.googleapis.com/language/translate/v2
key: null
languages: config/Google.yaml
Yandex:
api: https://translate.yandex.net
key: null
languages: config/Yandex.yaml
Youdao:
api: https://openapi.youdao.com/api
appKey: null
appSecret: null
languages: config/Youdao.yaml
LingoCloud:
api: https://api.interpreter.caiyunai.com/v1
account: wikimedia
key: null
languages: config/LingoCloud.yaml
OpusMT:
api: https://opusmt.wmflabs.org/api/translate
languages: config/OpusMT.yaml
TestClient:
languages: config/TestClient.yaml
dictionary:
Dictd:
languages: config/Dictd.yaml
JsonDict:
languages: config/JsonDict.yaml
~/Documents/mediawiki$ cat .env
MW_DOCKER_PORT=8080
MW_SCRIPT_PATH=/w
MW_SERVER=http://localhost:8080
MEDIAWIKI_USER=Admin
MEDIAWIKI_PASSWORD=dockerpass
XDEBUG_CONFIG=''
CXSERVER_PORT=8090
MW_DOCKER_UID=501
MW_DOCKER_GID=20
~/Documents/mediawiki$ cat docker-compose.override.yml
version: '3.7'
services:
mediawiki:
# On Linux, these lines ensure file ownership is set to your host user/group
user: "${MW_DOCKER_UID}:${MW_DOCKER_GID}"
mediawiki-web:
user: "${MW_DOCKER_UID}:${MW_DOCKER_GID}"
mariadb-main:
image: 'bitnami/mariadb:latest'
volumes:
- mariadbdata:/bitnami/mariadb
environment:
- MARIADB_REPLICATION_MODE=master
- MARIADB_REPLICATION_USER=repl_user
- MARIADB_REPLICATION_PASSWORD=repl_password
- MARIADB_ROOT_PASSWORD=main_root_password
- MARIADB_USER=my_user
- MARIADB_PASSWORD=my_password
- MARIADB_DATABASE=my_database
mariadb-replica:
image: 'bitnami/mariadb:latest'
depends_on:
- mariadb-main
environment:
- MARIADB_REPLICATION_MODE=slave
- MARIADB_REPLICATION_USER=repl_user
- MARIADB_REPLICATION_PASSWORD=repl_password
- MARIADB_MASTER_HOST=mariadb-main
- MARIADB_MASTER_PORT_NUMBER=3306
- MARIADB_MASTER_ROOT_PASSWORD=main_root_password
cxserver:
build:
context: ../cxserver
volumes:
# map local to remote folder, exclude node_modules
- ../cxserver:/opt/cxserver
- /opt/cxserver/node_modules
ports:
- "${CXSERVER_PORT:-8090}:8080"
command: npm start
eventlogging:
build:
context: ./extensions/EventLogging
volumes:
# map local to remote folder, exclude node_modules
- ./extensions/EventLogging:/opt/eventlogging
- /opt/eventlogging/node_modules
ports:
- "${EVENTLOGGING_PORT:-8192}:8192"
command: npm run eventgate-devserver
volumes:
mariadbdata:
driver: local
Event Timeline
zeljkofilipin
created this paste.
Sep 10 2021, 11:44 AM
2021-09-10 11:44:14 (UTC+0)
zeljkofilipin
archived this paste.
zeljkofilipin
mentioned this in
T290724: `CANCELED [mediawiki_cxserver internal] load metadata for docker.io/library/node:10-buster` when following instructions from MediaWiki-Docker/Extension/ContentTranslation
.
Log In to Comment