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

Merged
merged 1 commit into from
Jan 28, 2025
Merged

Migrate dependencies to /data/olympia #23015

merged 1 commit into from
Jan 28, 2025

Conversation

KevinMind
Copy link
Contributor

@KevinMind KevinMind commented Jan 22, 2025

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

Run "make down && make up" to run with fresh volumes.

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

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.

@KevinMind KevinMind changed the title Move-deps-more Migrate dependencies to /data/olympia Jan 22, 2025
@KevinMind KevinMind force-pushed the move-deps-more branch 2 times, most recently from b877b07 to 3d56f05 Compare January 27, 2025 13:13
@KevinMind KevinMind requested review from a team, eviljeff and diox and removed request for a team January 27, 2025 13:13
- 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 merged commit 9e116d7 into master Jan 28, 2025
49 checks passed
@KevinMind KevinMind deleted the move-deps-more branch January 28, 2025 15:58
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.

2 participants