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

26 Коммитов

Автор SHA1 Сообщение Дата
smith be21341d9a
optipng won't compile on mac silicon (#5581)
- create a Make option 'init-mac' to account for it
- allow run-boostrap.sh to process the new --optipng-fix flag

Open to better ideas (yes, move to linux is valid)
- Determining if you are on Apple silicon from
  run-bootstrap directly appeared to be problematic
  since it is running in a container
- Doing it prior in the make call seemed to make sense
  - change nothing for exisitng processes but add a
    simpler way forward for Mac folk
2024-05-02 14:14:02 -07:00
Mathieu Leplatre 3feeed99f2
Add format target for Makefile 2023-11-23 13:18:10 +01:00
Mathieu Leplatre 497cd4bc61
Use alias for make start 2023-11-23 13:10:21 +01:00
Mathieu Leplatre 58582a1131
Fix handling of .env 2023-11-23 13:10:03 +01:00
Ryan Johnson 28238acfbd
flip the switch to postgres (#5609)
* switch database to postgres

* modify kitsune/dashboards/readouts.py to work with postgres

* modify dashboards/models.py to work with postgres

* modify cache_most_unhelpful_kb_articles.py to work with postgres

* modify wiki/views.py to work with postgres

* modify kpi/api.py to work with postgres

* modify auto_archive_old_questions.py to work with postgres

* ignore email when falsy in FXAAuthBackend.update_user

* fix NotificationsTests.test_solution_notification

* account for postgres ordering of num_visits

* fix question num_votes_past_week when no votes

* fix order_by within the fix_current_revisions command

* improve performance of usernames API

* ensure null values are ordered as expected (1464)

* ensure postgres uses index for helpful votes query (1485)

* ensure announcement query uses timestamp indexes (1492)

* ensure HelpfulVote.created queries use DB index (1492)

* ensure forums.Post.created queries use DB index (1492)

* ensure Question.created queries use DB index (1492)

* ensure QuestionVote.created queries use DB index (1492)

* ensure Question.updated queries use DB index (1492)

* ensure Answer.created/Revision.created queries use DB index (1492)

* limit expensive KPI queries to the last 365 days
2023-11-09 13:33:32 -08:00
Tasos Katsoulas 500fec16f9 Switch to poetry.
Bump all packages.
2022-03-10 15:05:14 +02:00
Leo McArdle 97a7514315 fix tests to work with webpack
run tests through webpack first, then mocha
reorganise webpack config files
2021-12-17 12:51:02 +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
Leo McArdle 3134dec758
Merge branch 'master' into webpack 2021-10-18 13:56:24 +01:00
Tasos Katsoulas 76079ccf4d
Account for docker compose v2 2021-09-29 13:07:27 +03:00
Leo McArdle bfcd6bb250
replicate existing postcss setup in webpack (#4840)
https://github.com/mozilla/sumo-project/issues/877
2021-07-13 14:34:23 +01: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 3ebcbd5382 Remove ES2 code-base. 2021-05-26 18:09:31 +03:00
Leo McArdle c3fcd3a040
move circleci docker volume workaround outside of Makefile (#4703) 2021-03-04 11:57:02 +00: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
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
Kasey Kelly fd295a1645
homepage WIP in styleguide 2019-12-10 13:35:47 +02:00
Tasos Katsoulas 2629ecb6cb
Update makefile for frontend tooling. 2019-12-02 17:51:21 +02:00
John Giannelos bd14265079 Add orchestration for building styleguide 2019-11-28 12:59:46 +01:00
John Giannelos bbbb89a3ad Add orchestration for building .scss files 2019-11-27 18:33:10 +01:00
Tasos Katsoulas 22230f7a86
Remove bower from the project. 2019-11-27 16:49:52 +02:00
Paul McLanahan 531cc2754d
Fix issue with docker-compose pull in Makefile 2019-01-03 20:13:39 -05:00
Paul McLanahan e846d4829a
Fix issue with incorrect env var name in Makefile 2019-01-03 19:55:19 -05:00
Paul McLanahan c20dfd8d3c Fix build issues
* Ensure docker environment is setup for l10n linting (use make)
* Ensure docker build args are passed to docker (GIT_SHA, and LOCALE_ENV)
* Make git commands for locale repo cleaner with -C
2019-01-03 19:38:38 -05: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