2019-10-22 12:24:05 +03:00
|
|
|
version: "2.4"
|
2018-01-12 08:58:00 +03:00
|
|
|
|
|
|
|
x-env-mapping: &env
|
|
|
|
environment:
|
|
|
|
- CELERY_BROKER_URL=amqp://olympia:olympia@rabbitmq/olympia
|
|
|
|
- CELERY_RESULT_BACKEND=redis://redis:6379/1
|
2018-08-17 17:36:25 +03:00
|
|
|
- DATABASES_DEFAULT_URL=mysql://root:@mysqld/olympia
|
2018-01-12 08:58:00 +03:00
|
|
|
- ELASTICSEARCH_LOCATION=elasticsearch:9200
|
|
|
|
- MEMCACHE_LOCATION=memcached:11211
|
|
|
|
- MYSQL_DATABASE=olympia
|
|
|
|
- MYSQL_ROOT_PASSWORD=docker
|
2018-01-26 09:08:08 +03:00
|
|
|
- OLYMPIA_SITE_URL=http://olympia.test
|
2018-01-12 08:58:00 +03:00
|
|
|
- PYTHONDONTWRITEBYTECODE=1
|
|
|
|
- PYTHONUNBUFFERED=1
|
|
|
|
- TERM=xterm-256color
|
2019-03-12 02:20:06 +03:00
|
|
|
- UITEST_FXA_EMAIL
|
|
|
|
- UITEST_FXA_PASSWORD=uitester
|
2019-09-12 15:05:33 +03:00
|
|
|
- CIRCLECI=${CIRCLECI}
|
2015-08-24 20:56:42 +03:00
|
|
|
|
2017-10-05 14:14:08 +03:00
|
|
|
services:
|
|
|
|
worker: &worker
|
2018-01-12 08:58:00 +03:00
|
|
|
<<: *env
|
2019-03-22 14:25:33 +03:00
|
|
|
image: addons/addons-server:latest
|
2017-10-05 14:14:08 +03:00
|
|
|
command: supervisord -n -c /code/docker/supervisor-celery.conf
|
2019-10-22 12:24:05 +03:00
|
|
|
user: olympia
|
2017-10-05 14:14:08 +03:00
|
|
|
volumes:
|
|
|
|
- .:/code
|
|
|
|
extra_hosts:
|
2018-01-26 09:08:08 +03:00
|
|
|
- "olympia.test:127.0.0.1"
|
2014-10-01 15:44:44 +04:00
|
|
|
|
2017-10-05 14:14:08 +03:00
|
|
|
web:
|
|
|
|
<<: *worker
|
|
|
|
command: supervisord -n -c /code/docker/supervisor.conf
|
2015-10-03 00:15:13 +03:00
|
|
|
|
2017-10-05 14:14:08 +03:00
|
|
|
nginx:
|
|
|
|
image: addons/addons-nginx
|
|
|
|
volumes:
|
|
|
|
- ./static:/srv/static
|
|
|
|
- ./site-static:/srv/site-static
|
2018-10-16 14:45:29 +03:00
|
|
|
- ./storage/shared_storage/uploads:/srv/user-media
|
|
|
|
- ./storage/files:/srv/user-media/addons
|
2020-02-21 16:06:27 +03:00
|
|
|
- ./storage/guarded-addons:/srv/user-media/guarded-addons
|
2019-03-12 02:20:06 +03:00
|
|
|
ports:
|
|
|
|
- "80:80"
|
2020-03-28 19:42:41 +03:00
|
|
|
networks:
|
|
|
|
default:
|
|
|
|
aliases:
|
|
|
|
- olympia.test
|
|
|
|
depends_on:
|
|
|
|
- web
|
|
|
|
- addons-frontend
|
2014-10-01 15:44:44 +04:00
|
|
|
|
2017-10-05 14:14:08 +03:00
|
|
|
memcached:
|
|
|
|
image: memcached:1.4
|
2014-10-01 15:44:44 +04:00
|
|
|
|
2017-10-05 14:14:08 +03:00
|
|
|
mysqld:
|
|
|
|
image: mysql:5.7
|
|
|
|
environment:
|
|
|
|
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
|
|
|
|
- MYSQL_DATABASE=olympia
|
2014-10-01 15:44:44 +04:00
|
|
|
|
2017-10-05 14:14:08 +03:00
|
|
|
elasticsearch:
|
2020-05-28 21:47:07 +03:00
|
|
|
image: docker.elastic.co/elasticsearch/elasticsearch:6.8.8
|
2017-10-05 14:14:08 +03:00
|
|
|
environment:
|
2018-07-26 17:32:19 +03:00
|
|
|
# Disable all xpack related features to avoid unrelated logging
|
|
|
|
# in docker logs. https://github.com/mozilla/addons-server/issues/8887
|
|
|
|
# This also avoids us to require authentication for local development
|
|
|
|
# which simplifies the setup.
|
2017-10-05 14:14:08 +03:00
|
|
|
- xpack.security.enabled=false
|
2018-07-26 17:32:19 +03:00
|
|
|
- xpack.monitoring.enabled=false
|
|
|
|
- xpack.graph.enabled=false
|
|
|
|
- xpack.watcher.enabled=false
|
Default to 'and' operator for match queries. Remove slug search, prioritize exact matches more. (#7303)
* Default to 'and' operator for match queries. Remove slug search, prioritize exact matches more.
References many "component: search" issues. What I tested with a
database of all public add-ons:
Example searches:
tab center redux - should find "Tab Center Redux" while "Tab Mix Plus" is probably second and "Redux DevTools" 4th or so
Open Image in New Tab -> should find "Open Image in New Tab" while "Open Bookmarks in New Tab" should be 2nd or 3rd
CoinHive -> Finds "Coinhive Blocker", "CoinBlock" (prefix search) and "NoMiners" (description)
Privacy -> Finds "Privacy Badger", "Privacy Pass", "Privacy Settings", "Google Privacy" (probably 4th or so) and "Blur" (summary + description + many users). Scores "Ghostery" on the first page but ranks it in the middle
firebu -> Finds "Firebug", "Firebug Autocompleter", "Firefinder for Firebug"
fireb -> Scores "Fire Drag" first, puts "Firebug" approximately 3rd or so
Menu Wizzard -> Finds "Menu Wizard" (fuzzy, typo) first, then "Add-ons Manager Context Menu" apparently because it matches good in the title and has many users
Frame Demolition -> Finds "Frame Demolition"
Demolition -> Finds only "Frame Demolition", same for "Demolation" (typo)
reStyle -> Finds "reStyle" and scores a few add-ons that match on "restore" next since the term is similar
MegaUpload DownloadHelper -> finds "MegaUpload DownloadHelper" first, scores "Video DownloadHelper" and "RadpidShare DownloadHelper" next. Doesn't find "Popup Blocker" anymore as currently happening on -prod
MegaUpload -> only finds "MegaUpload DownloadHelper" and nothing else
No Flash -> Scores "No Flash" first, then depending on users "Download Flash and Video", "YouTube Flash Video Player" and "YouTube Flash Player" (not necessarily in that order)
Disable Hello, Pocket & Reader+ -> finds "Disable Hello, Pocket & Reader+" first (yeay!), then scores "Reader", "Disable WebRTC" and "In My Pocket" next similarly to what's happening on -prod currently
Not working yet:
privacybadger -> "Privacy Badger" -> will probably need some kind of ngram filtering and analyzing (#591)
eyes -> 'decentraleyes' -> Not sure this should actually work, will probably need some more analyzing too (#591)
Not sure if it's specifically only because of these changes but #3248 is fixed.
This potentially fixes #7244, #6891, #6837, #6417, mozilla/addons#359.
Not sure if this fixes #mozilla/addons#567 but the results look much more promising and the amount of results doesn't explode here. I only have 2.8k add-ons for testing though so I'm not too sure.
And might be relevant to #6137.
This is a big step towards #2661, I doubt we can call this fixed though.
* Fix name tests
* Speed up ES tests, make scoring results more predictable by using only one shard and one replica
* Add tests
* Only test on new apiv3 based search.
* Fixup 'get_results'
* Remove debug print
* Isort imports
* Fix test settings, I'm blind.
* Adapt number of shards to what we define in settings_test
* Test search for grapple
* Remove property filtering in legacy api search, fix tests, fix flake8
* Add comment explaining shard config
* Fix tests again, add default platform, fix total counts again.
* Try to do some fixture cleanup, let's see...
* More test refactoring, make use of dfs-query-then-fetch during tests, allow us to test this later too via a waffle flag.
* Don't use waffle flag for legacy search, only for apiv3 searches.
* Fix unused import, fix usage of 'params'
* Use query-then-fetch in a regular addons-view tool, fix a few more tests to be able to handle the waffle-flag
* Create the dfs query then fetch flag only in ESTestCase, delete it properly. More serializer fixes
* precache the waffle flag for autocomplete tests too
* Minor cleanups
* Add docs, fix code style
* Add a todo
* Fix codestyle
2018-01-30 08:26:30 +03:00
|
|
|
- "discovery.type=single-node"
|
2017-10-05 14:14:08 +03:00
|
|
|
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
|
|
|
mem_limit: 2g
|
2015-08-24 20:56:42 +03:00
|
|
|
|
2017-10-05 14:14:08 +03:00
|
|
|
redis:
|
|
|
|
image: redis:2.8
|
|
|
|
|
|
|
|
rabbitmq:
|
|
|
|
image: rabbitmq:3.5
|
|
|
|
hostname: olympia
|
|
|
|
expose:
|
|
|
|
- "5672"
|
|
|
|
environment:
|
|
|
|
- RABBITMQ_DEFAULT_USER=olympia
|
|
|
|
- RABBITMQ_DEFAULT_PASS=olympia
|
|
|
|
- RABBITMQ_DEFAULT_VHOST=olympia
|
|
|
|
|
2017-11-13 19:29:57 +03:00
|
|
|
autograph:
|
2019-06-06 13:37:30 +03:00
|
|
|
image: mozilla/autograph:3.3.2
|
2019-06-12 16:01:36 +03:00
|
|
|
command: /go/bin/autograph -c /code/scripts/autograph_travis_test_config.yaml
|
|
|
|
volumes:
|
|
|
|
- .:/code
|
2017-11-13 19:29:57 +03:00
|
|
|
|
2018-03-02 01:05:40 +03:00
|
|
|
addons-frontend:
|
|
|
|
<<: *env
|
|
|
|
environment:
|
2019-03-12 02:20:06 +03:00
|
|
|
- API_HOST=http://olympia.test
|
|
|
|
- PROXY_API_HOST=http://olympia.test
|
2018-08-28 21:48:35 +03:00
|
|
|
- HOSTNAME=uitests
|
2019-03-05 15:23:56 +03:00
|
|
|
- WEBPACK_SERVER_HOST=olympia.test
|
|
|
|
- CSP=false
|
2018-08-28 21:48:35 +03:00
|
|
|
- FXA_CONFIG=default
|
2019-04-01 17:12:28 +03:00
|
|
|
image: mozilla/addons-frontend:latest
|
2018-04-23 09:02:15 +03:00
|
|
|
ports:
|
|
|
|
- "3000:3000"
|
|
|
|
- "3001:3001"
|
2019-03-05 15:23:56 +03:00
|
|
|
command: yarn amo
|