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

82 Коммитов

Автор SHA1 Сообщение Дата
Kevin Meinhardt b3d0a224f1
Sync storage with make up flow (#22805)
* Sync storage with make up flow

* data_load should clean storage directory
2024-11-12 16:32:27 +01:00
Kevin Meinhardt 031f7b96ac
Remove redunant docker volumes, remove shared docker volumes, remove renew-anon-volumes, strict filter on volume cleaning (#22780) 2024-11-05 15:40:54 +01:00
Kevin Meinhardt 93fb6c5fec
Dev-mode (#22748)
* Decouple DEBUG from DEV_MODE to enable running dev/prod mode independent of debug.

* Update settings_test.py

Co-authored-by: Mathieu Pillard <diox@users.noreply.github.com>

* TMP: hardcode devmode false in prod

---------

Co-authored-by: Mathieu Pillard <diox@users.noreply.github.com>
2024-10-18 17:39:49 +02:00
Mathieu Pillard bc34e66cfa
Fix user-media loading in local environments (#22732)
* Fix user-media loading in local environments

URLs with /user-media/foo should map to
<root_storage>/user-media/shared_storage/uploads/ on the filesystem.
2024-10-07 17:51:50 +02:00
Mathieu Pillard 020bafff59
Revert "Move assets stage to production only image (#22710)" (#22723)
This reverts commit 27dd5fd1c1.
2024-09-30 14:48:43 +02:00
Kevin Meinhardt 27dd5fd1c1
Move assets stage to production only image (#22710)
* Simplify static file mounts in nginx

* Only compile assets in production image

* TMP: ensure volume dirs exist

* TMP: use django to create staticfile dirs

* Update src/olympia/core/apps.py

Co-authored-by: Mathieu Pillard <diox@users.noreply.github.com>

* Update src/olympia/lib/settings_base.py

Co-authored-by: Mathieu Pillard <diox@users.noreply.github.com>

---------

Co-authored-by: Mathieu Pillard <diox@users.noreply.github.com>
2024-09-27 23:23:59 +02:00
Kevin Meinhardt 90f997a2d2
Small fixes to docker setup (logs, static file routing, healthcheck, dockerignore) (#22679)
* Only log docker compose if specified in CI run-docker step

* Better and alphabetized ignore paths for git and docker

* Less aggressive post start health checks

* Clean up redundant code

* Add better documentation about dockerignore/gitignore

* Update start period
2024-09-24 19:54:25 +02:00
Kevin Meinhardt 2a64618e9d
Enable Production Mode via DEBUG or docker-compose.ci.yml (#22613)
* TMP: clean bake metadata file

* SPLIT: Log UWSGI in docker compose console

Remove PID

* SPLIT: Raise error in update_assets if file not found

* Enable Production mode via DEBUG and or docker-compose.ci.yml

* Option 1: Load node_modules from statifiles directory

* Option 2: Load node_modules via django-node-asset

* separate ./static from locally built static files

* Add docs for static file serving

* TMP: fixes from code review

* Update docs/topics/development/static-files.md

Co-authored-by: Mathieu Pillard <diox@users.noreply.github.com>

* TMP: update docs

---------

Co-authored-by: Mathieu Pillard <diox@users.noreply.github.com>
2024-09-05 16:20:03 +02:00
Kevin Meinhardt ad91f29730
Revert "Enable running wsgi in production mode" (#22614)
This reverts commit 469f85f6924f0c94b8e0b4af369416149beb65de.
2024-08-30 13:12:12 +02:00
Kevin Meinhardt e3b8da1533 Enable running wsgi in production mode 2024-08-30 13:02:49 +02:00
Kevin Meinhardt d7b21e18e6
Remove supervisor and enable more efficient container startup (#22592)
* TMP: add http server to expose version endpoint

* Use data volume for mounting repository files

* Use watchmedo directly from docker to run celery

* TMP: fix test

* TMP: remove data_olympia volume on ci yml

* TMP: add settings djanmgo modeul to celery worker.

* TMP: remove references to ssupervisor

* Update docs/topics/development/building_and_running_services.md

Co-authored-by: Mathieu Pillard <diox@users.noreply.github.com>

---------

Co-authored-by: Mathieu Pillard <diox@users.noreply.github.com>
2024-08-27 12:42:10 +02:00
Kevin Meinhardt e4ceb64b9e
Remove the chown command from entrypoint. (#22584)
* Remove the chown command from entrypoint.

* TMP: remove redundant timeout on the health check for worker/web containers
2024-08-23 12:00:32 +02:00
William Durand 56c7318a9e
Fix storage volume config for the nginx service (#22409) 2024-07-02 12:39:01 +02:00
Kevin Meinhardt 59156f8674
Stability fixes for docker compose lifecycle (#22378)
* Stability fixes for docker compose lifecycle

* Update docs/topics/development/setup_and_configuration.md

Co-authored-by: Andrew Williamson <awilliamson@mozilla.com>

* TMP: response to comments

* Update docs/topics/development/setup_and_configuration.md

Co-authored-by: William Durand <will+git@drnd.me>

---------

Co-authored-by: Andrew Williamson <awilliamson@mozilla.com>
Co-authored-by: William Durand <will+git@drnd.me>
2024-06-21 14:22:42 +02:00
Kevin Meinhardt be592a247a
Ditch the /deps volume (#22332)
* Ditch the /deps volume

* TMP: remove update deps at the beggingin

* TMP: add comment
2024-06-10 13:18:25 +02:00
Kevin Meinhardt 42513e191e
Use consistent and robust mapping of UID between host and container: (#22206)
* Use consistent and robust mapping of UID between host and container:
- collapse UID/GID to one value on host and container
- rename host value to HOST_UID for clarity and debugability
- rename fix_olympia_user to entrypoint and set as docker compose entrypoint
- uwsgi config to use runtime value of olympia UID/GID

* Docker compose fail after 5 attempts to start

* TMP: update outdated comment

* TMP: comment the entrypoint
2024-05-06 14:07:55 +02:00
Kevin Meinhardt adc37153dd
Optimize multi stage docker build (#22195)
* Add checks to verify built docker image

TMP: rename dependencies.txt

* Remove unused and uninstalled package

* More efficient multi stage docker buildTMP: reorganize docker more efficiently

* Organize dockerfile
- split base and olympia stages
- use heredocs for multiline RUN steps
- move file copy to source layer
- merge run steps where possible

* TMP: fix invalid bash syntax in dockerfile

* TMP: add comments to dockerfile
2024-05-06 12:50:34 +02:00
Mathieu Pillard 0f034f4789
Upgrade base image to Debian bookworm (#22044)
* Upgrade base image to Debian bookworm

* Explicitly add pkg-config

* Add basic system check for uwsgi

* Add docstring
2024-03-25 17:29:14 +01:00
Kevin Meinhardt 7f1ff51138
Automate L10n extract/merge with reusable docker run github action (#21966)
* Reusable Docker run action (Bunch of other stuff here to make it work)

* extract locales

* remove extraneous log

---------

Co-authored-by: Mozilla Add-ons Robot <addons-dev-automation+github@mozilla.com>
2024-03-18 11:42:04 +01:00
Mathieu Pillard 0c5c155e4b
Remove local mirror of MySQL repo (#21901)
* Revert "Build local mysql apt mirror to work around upstream repo breakage  (#21018)"

This reverts commit 550a4a4754.

* Update MySQL GPG key

* Stop forcing buster
2024-02-21 12:30:00 +01:00
Mathieu Pillard c3aeccae00
Update nodesource list & GPG key following upstream changes (#21770)
The old source list and key are still supported but no longer
updated. This gets us on NodeJS 18.19.
2024-01-30 14:15:15 +01:00
Kevin Meinhardt 3ab0252f3a
chore(): add swagger UI to document our apis (#21521)
* chore(): generate api versions from method

* chore(): add swagger UI to document our apis
2023-12-11 18:26:58 +01:00
Mathieu Pillard 1fc7e71b11
Switch to Node.js 18.x (#21557) 2023-12-05 15:02:31 +01:00
Andrew Williamson 8e3948be68
Revert "Switch to Node.js 18.x (#21400)" (#21420)
This reverts commit 42f26f29dc.
2023-11-09 22:07:43 +00:00
Mathieu Pillard 42f26f29dc
Switch to Node.js 18.x (#21400) 2023-11-06 16:48:52 +01:00
Mathieu Pillard 550a4a4754
Build local mysql apt mirror to work around upstream repo breakage (#21018)
* Build local mysql apt mirror to work around upstream repo breakage
2023-07-19 13:18:05 +02:00
Mathieu Pillard 5c0e7a3c88
Merge deployment and development Dockerfiles (#20480)
* Merge deployment and development Dockerfiles
* Stop using root to install dependencies
* Run make commands from os with --user olympia
2023-03-23 15:46:56 +01:00
Mathieu Pillard 3f83f99131
Remove old update service (#20086)
* Remove old update service

* Remove more code/docs associated with services/

* Add some missing pytest.mark.django_db that the autouse fixture was hiding...

* Remove extra import

* Add a comment documenting what the update URL typically looks like
2022-12-12 12:45:11 +01:00
Mathieu Pillard e906a7f6bf
Switch to Node 16 by default (#19751)
* Switch to Node 16 by default

* Fix python image tag to include node
2022-10-04 19:28:59 +02:00
Andrew Williamson 21e06a38e6
limits all our logging to 10MB per log, with one backup (#19677) 2022-09-08 15:23:15 +01:00
Mathieu Pillard 41d4eba243
Upgrade pygit2 to 1.10.0, remove libgit2-dev dependency (#19570)
We shouldn't need libgit2-dev anymore (and it outdated anyway) because
the latest pygit2 versions provide precompiled wheels that match our
setup.
2022-08-17 10:18:46 +02:00
Mathieu Pillard 79120c148f
Run watchmedo through supervisor in local envs instead of through uwsgi (#19513)
* Run watchmedo through supervisor in local envs instead of through uwsgi

This should prevent a storm of watchmedo processes when there are changes,
as this should keep the same long-lived watchmedo process instead of
spawning new ones.

Also, watch a specific file instead of the whole directory to avoid
reloads when just opening a shell (since bash_history is written to
the artifacts dir)

* add reload file to git, run on with /code/

* Watch /code/src for both celery and uwsgi

* Keep safe-pidfile
2022-07-27 17:53:51 +02:00
Mathieu Pillard 6ad03404b0
Limit number of celery workers in local envs to 2 (#19375) 2022-06-16 18:49:30 +02:00
Mathieu Pillard 8c2e3cdd07
Re-implement update service in Django (#19322)
Re-implement update service in Django

Lives in parallel for now - the switch between the 2 will happen through nginx config changes.
2022-06-07 15:09:17 +02:00
Mathieu Pillard 6b5e175a49
Introduce minimal config to make versioncheck works locally (#19045)
This is nicer than having to remember to look up the docs to
do it manually, make it work with docker etc. It works out of
the box.
2022-03-31 13:19:57 +02:00
Mathieu Pillard 0047612d29
Serve xpis through addons server (#18978)
* Import addons-nginx into addons-server

* Serve xpis through X-Accel-Redirect instead of redirecting to dedicated domain

The so called "CDN URLs" for files are less useful now that even AMO main domain
is behind a CDN, and we want to move away from it because internally it exposes
paths on EFS that nginx is serving directly, making directory structure changes
difficult.

This commit focuses on the download_file/download_latest endpoints
addons-server exposes, and leaves the old dedicated CDN domain intact for the
moment - it is still used by the update service but will go away in a future
commit.

* Few fixes and test updates

* filename is an optional argument

* Test fixes

* Add assertions about caching

* Fix latest url

* Rename type_ to download_type

* reformat url definition
2022-03-16 15:19:47 +01:00
Mathieu Pillard 676b4b2576
Update MySQL releases GPG key (#18636)
Per
https://dev.mysql.com/downloads/repo/apt/
https://dev.mysql.com/doc/refman/8.0/en/checking-gpg-signature.html
2022-01-18 12:03:57 +01:00
bqbn bc56293027
Upgrade Node to v14 (#17475)
Fix #17331
2021-07-13 12:07:45 +02:00
William Durand 319d2063ba
Remove unused mysql config (#16080) 2020-12-02 14:14:15 +01:00
Mathieu Pillard 09030e01bb
Use MySQL client & libs, not MariaDB (#15932)
We're using MySQL 8.0 from MySQL, not MariaDB, so client libs should
follow for consistency - especially as MariaDB doesn't support the
default auth method MySQL 8 uses.

Also contains a slight refactor of the Dockerfile-s to have fewer
steps and be more consistent with each other.
2020-11-06 12:20:43 +01:00
bqbn 6ad8f3c63a
Upgrade node version to v12 (#15549)
Co-authored-by: William Durand <will+git@drnd.me>
2020-09-23 12:08:46 +02:00
William Durand 728925609b
Fix wrong mimetype for ts files (#15102) 2020-07-29 12:04:12 +02:00
William Durand 09bbe0a616
Refactor get_mime_type_for_blob() (#14211) 2020-05-11 11:52:34 +02:00
championshuttler 5e8bac4991 Remove unused file after migrating to Debian Buster Image 2020-04-23 00:50:26 +05:30
championshuttler d17bc0b389 Upgrade docker image to latest Debian Buster 2020-04-20 18:17:55 +05:30
William Durand 57e7dffe7a
Update pygit2 to 1.1.1 (#13925) 2020-04-08 11:54:04 +02:00
William Durand e7b906b290
Revert "Update pygit2 to 1.1.1 (#13921)" (#13924)
This reverts commit 1107b0a00c.
2020-04-07 19:00:50 +02:00
William Durand 1107b0a00c
Update pygit2 to 1.1.1 (#13921) 2020-04-07 18:11:25 +02:00
Christopher Grebs 62a0f78daf
Fix uwsgi.ini syntax error caused by broken merge. 2020-03-12 10:11:18 +01:00
Christopher Grebs b4ceb66311 Revert "Move to a rolling debian-testing release for libmagic and libg… (#13488)"
This reverts commit d0272a9b3a.
2020-02-18 17:51:34 +01:00