Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate dependencies to /data/olympia #23015

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

KevinMind
Copy link
Contributor

Relates: mozilla/addons#15066

Description

  • Updated docker-compose.yml to mount dependencies in /data/olympia/deps for better organization.
  • Modified Dockerfile to set environment variables for dependency directories and ensure proper ownership.
  • Adjusted Makefile-docker to remove NODE_MODULES variable and streamline npm commands.
  • Updated documentation to reflect changes in dependency paths.
  • Refactored install_deps.py to clean up dependency directories and removed obsolete package.json copying logic.
  • Updated settings_base.py to reference new dependency paths.

Context

Effectively, we are moving the path to pip and node dependencies to where you would find them on the host (/data/olympia) ./deps and ./node_modules.

This gives us a few benefits:

  • centralizes all code for our image to one parent folder instead of splitting dependencies out to /deps. simpler file permissions management
  • enables mounting a single docker volume to mount the ./deps into the correct location instead of having to remap that within the container to /deps
  • enables running npm commands without having to define custom paths to node modules and executables. npm run "command" just works now.

Testing

You should notice that changes in ./deps or ./node_modules on the host are propogated into the container.

TBD: run the conatiner prod mode to ensure we don't break production

Checklist

  • Add #ISSUENUM at the top of your PR to an existing open issue in the mozilla/addons repository.
  • Successfully verified the change locally.
  • The change is covered by automated tests, or otherwise indicated why doing so is unnecessary/impossible.
  • Add before and after screenshots (Only for changes that impact the UI).
  • Add or update relevant docs reflecting the changes made.

…ing make up

- Replaced the locale compilation script from a shell script to a Python script (compile_locales.py) for better error handling and parallel processing.
- Updated the update_assets target in Makefile-docker to use the new update_assets.py script.
- Removed the obsolete compile-mo.sh script.
- Introduced sync_host_files.py to streamline dependency updates and asset synchronization.
- Updated docker-compose.yml to mount dependencies in /data/olympia/deps for better organization.
- Modified Dockerfile to set environment variables for dependency directories and ensure proper ownership.
- Adjusted Makefile-docker to remove NODE_MODULES variable and streamline npm commands.
- Updated documentation to reflect changes in dependency paths.
- Refactored install_deps.py to clean up dependency directories and removed obsolete package.json copying logic.
- Updated settings_base.py to reference new dependency paths.
@KevinMind KevinMind changed the title Move-deps-more Migrate dependencies to /data/olympia Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant