Граф коммитов

46 Коммитов

Автор SHA1 Сообщение Дата
Ryan Johnson ba2f95a95d
update all dependencies (#5382)
* update all non-dev deps except bleach & py-wikimarkup

* remove pip from deps & update version in Dockerfile

* update poetry to the latest version

* replace pytz with built-in code

* remove pytz package

* move to Python 3.11

* update to just-released pip 23.0

* update bleach and py-wikimarkup

* update all dev dependencies

* update to django 4.1.6 (released today)

* remove python as a dependency of itself
2023-02-02 08:48:18 -08:00
Ryan Johnson 5605da807c
strengthen test target in dockerfile (#5362)
* strengthen test target in dockerfile
* fix tests now that localization is active
2023-01-09 09:07:43 -08:00
Tasos Katsoulas f670157e58
Bump pip and poetry 2022-10-14 16:54:16 +03:00
Leo McArdle 7d6db0a5dd
add svelte pre-render to prod build 2022-10-14 16:53:50 +03:00
Tasos Katsoulas 500fec16f9 Switch to poetry.
Bump all packages.
2022-03-10 15:05:14 +02:00
Tasos Katsoulas 2682b00d1b Bump python to 3.10
* Switch to gevent from Meinheld
2022-03-10 15:02:39 +02:00
Leo McArdle f07177b724
move home directory for kitsune docker user (#5017)
this avoids vscode creating various files and folders in our source
directory when using a devcontainer

this also fixes pylance maxing out a cpu core when using a devcontainer

additionally, set vscode itself as the editor when commands (such as
git) are opened from its integrated terminal in a devcontainer
2022-01-31 09:31:31 +00:00
Leo McArdle f96a54adce
upgrade node to lts, and upgrade dependencies (#4977)
remove unused dependencies
2022-01-11 15:43:26 +00:00
Leo McArdle 4ca5c12e4a replace nunjucks_precompile with webpack loader (#4981)
https://github.com/mozilla/sumo/issues/972
2022-01-06 16:55:27 +00:00
Leo McArdle 33b6de9a20
copy dist dir into prod image
needed for entrypoint html files, and source-to-asset.json file
2021-12-17 15:58:30 +00:00
Leo McArdle b8b9fa6c26
Merge branch 'main' into webpack 2021-12-16 12:44:14 +00:00
Leo McArdle 2871ee4cb4
move build pipeline to circleci (#4923) 2021-12-07 11:57:44 +00:00
Tasos Katsoulas 6d5a5dfade Rename old references to main branch 2021-11-24 12:25:51 +02:00
Tasos Katsoulas b526cb88db
Bump pip to 21.3.1 2021-11-10 18:05:46 +02:00
Leo McArdle e15e1595ff run webpack build in docker
remove frontend-base image, do everything in staticfiles image
add STATIC_URL_WEBPACK to jinja context for use by webpack html entrypoint files
2021-07-13 10:57:39 +01:00
Tasos Katsoulas 37720f2faa Remove monkeypatching for ES7. 2021-05-28 13:44:49 +03:00
Tasos Katsoulas 9254c4f985 Uppgrade project libraries.
* Bump pip version
2021-03-24 16:36:21 +02:00
Leo McArdle 2428573b49
add support for synonyms and character mappings to search (#4666)
- store synonyms in files
- add reload synonyms option to es7_init
- use non-oss kibana and elasticsearch images to get the reload analyzer api
- add command to create an elastic cloud bundle out of synonym files
- protect specific stop-word containing phrases from tokenization with char mappings
- add docs

https://github.com/mozilla/sumo-project/issues/721
https://github.com/mozilla/sumo-project/issues/748
2021-03-01 18:01:44 +00:00
Leo McArdle 9e9dda827e
fix our jsi18n files, clean-up old code (#4689)
the jsi18n files were being compiled without the locale files present

remove last references to yaocho

remove (broken) dynamic jsi18n routes

https://github.com/mozilla/sumo-project/issues/780
2021-02-22 14:16:12 +00:00
Leo McArdle 9f57a486aa
Merge branch 'master' into elasticsearch-v7 2020-11-19 10:59:13 +00:00
Tasos Katsoulas 971c7ee5dd Bump Python to version 3.9.
* Remove pip step in Dockerfile for tests.
* Update libraries
2020-11-18 12:02:01 +02:00
Leo McArdle 99f8ec9ffc
Merge branch 'master' into elasticsearch-v7 2020-10-05 16:50:17 +01:00
Leo McArdle b2a803f0c3
fix circle build (#4538)
remove typing (now part of stdlib)
re-order venv and pip install commands to ensure consistent pip version across circle and local dev
update pip, pip-tools and pip-compile-multi to latest
2020-09-23 16:36:32 +01:00
Vipul Kumar 91645ed37e
[Fix] set pip's timeout time
If user has low bandwidth, they may get a timeout error while
downloading Python packages from PyPi repository. This happens because
default timeout of pip is set to 60 seconds, which is very less for
large batch process; and it can be changed using "PIP_DEFAULT_TIMEOUT"
environment variable or by passing --default-timeout as an argument to
pip command[1].

[1]: https://pip.pypa.io/en/stable/user_guide/#environment-variables

Docker's "ARG" instruction allows us to pass variable's value at build
time using the `--build-arg <varname>=<value>` flag to `docker
build`[2][3] and `docker-compose build`[4] command. Default value of
"PIP_DEFAULT_TIMEOUT" variable is still set to 60 seconds because bogus
value may increase production built time which we want to fail pretty
fast, if we're not able to fetch something from PyPi. We can set it to 5
mins by running `docker build --build-arg PIP_DEFAULT_TIMEOUT=300` and
`docker-compose build --build-arg PIP_DEFAULT_TIMEOUT=300` for `docker`
and `docker-compose` command respectively.

[2]: https://vsupalov.com/docker-build-time-env-values/
[3]: https://docs.docker.com/engine/reference/builder/#arg
[4]: https://docs.docker.com/compose/reference/build/

Now we can change default timeout value of pip, by pass PIP_TIMEOUT as
an argument[1]. For example, if we want to set timeout value to 5
minutes, run `make build PIP_TIMEOUT=300` or `make build-ci
PIP_TIMEOUT=300` command; default value of PIP_TIMEOUT is 60 which also
the default timeout value of pip, itself.

[5]: https://stackoverflow.com/a/2826178

We only need to use 'PIP_TIMEOUT' variable, where 'base' image is
building because only 'base' image is fetching a lots of Python packages
from PyPi.

And add instruction about, how user can change default timeout value of
pip in the documentation.

Resolves: #4511
2020-08-29 06:50:48 +00:00
Tasos Katsoulas bd765f7cb4 Bump ES7 to version 7.8.1
* Fix typo in Dockerfile
* Expose ES* ports.
2020-08-06 16:37:50 +03:00
Tasos Katsoulas d7d8af1ace Intial ES7 work.
* Initial KB index.
* Task and management commands for indexing
* Monkeypatch for dual search services
* Install ES7 in /vendor
2020-07-27 15:58:08 +03:00
Tasos Katsoulas 222bf2ab16 Upgrade a few packages.
* Install timeout decorator
2020-06-29 18:26:48 +03:00
Tasos Katsoulas 9b4e14d841 Upgrade to python 3.8. 2020-06-01 19:12:47 +03:00
Tasos Katsoulas f2895821ae Fixes and upgrade packages. 2020-05-29 13:08:11 +03:00
Leo McArdle ff6efd65ca
run svgo when building staticfiles image (#4247) 2020-05-26 11:17:50 +01:00
Tasos Katsoulas 647ee23ca9 Upgrade pip to version 20.1.1 2020-05-25 18:16:43 +03:00
Tasos Katsoulas 30cfe5e615 Handle css through collectstatic
* MD5 hashes for css.
2020-04-30 15:57:13 +03:00
Leo McArdle b1a0b27164
run npm ci when building the prod image 2020-03-20 11:47:26 +00:00
Tasos Katsoulas bb1f4efe25 Replace libmariadbclient with libmariadb3. 2020-02-25 14:05:06 +02:00
Tasos Katsoulas 52fe7fe0a1 Upgrade to Debian buster. 2020-02-25 13:16:22 +02:00
Tasos Katsoulas 21f277e639
Install pip version < 20. 2020-01-23 18:51:59 +02:00
Tasos Katsoulas 301d6f4a7a
Add scss files into static. 2019-12-10 17:30:37 +02:00
Tasos Katsoulas 22230f7a86
Remove bower from the project. 2019-11-27 16:49:52 +02:00
John Giannelos 58e3eb0e1b Add docker stage to build frontend dependencies
* Remove yarn.lock
* Install npm packages that are compatible with Node 12
* Workaround mocha-jsdom incompatibility
* Ensure that mocha tests are still running
2019-11-21 17:21:41 +01:00
Chris Beaven 31fcbc44c6 Faster docker image creation by using docker chmod 2019-04-11 11:12:22 -04:00
Chris Beaven 4a929ede29 Add optipng to developer docker image to help with running tests locally 2019-04-11 11:12:22 -04:00
Paul McLanahan 84840e1681 Lint and push l10n files during docker build (#3435)
Also move prod l10n strings repo from "production" branch on the
l10n team's repo to github.com/mozmeao/sumo-l10n-prod.

Fix #3434
2019-01-02 11:11:00 -06:00
Paul McLanahan 3d3a14ed70 Move to a single Dockerfile and docker-compose file
Use make to create easy to use and remember commands for building
and running things.

* Remove Jenkins IRC notifications
* Update the README for the new commands
2018-11-12 11:22:56 -05:00
Giorgos Logiotatidis c42a121943 Delete old Dockerfile. 2017-12-01 09:45:59 +02:00
Giorgos Logiotatidis fac1ce026a Update docker. 2017-11-20 12:54:12 +02:00
Safwan Rahman ba91696d97 Implement docker with docker-compose (#2884)
* First phase implementing docker

* fix Dockerfile

* update hash

* Adding factory boy

* Update to pass more test

* More fixup as per review
2017-11-20 12:50:28 +02:00