PrairieLearn
PrairieLearn copied to clipboard
Use Ubuntu as a base for Docker
Hello, this is an idea that was brought up on slack by @jgfoster. With his help, we have been able to modify the PrairieLearn code to move from an Amazon:Linux base to an Ubuntu Image.
- We put all of the code to build the plbase in the Dockerfile instead of using a separate script. (We can change to script if that is the preference.)
- The use of a virtual environment was changed, so we are now installing things in a
/venvdirectory. (We can change if you like.) - We created directory to hold certificates so that the virtual environment could run correctly.
π Walkthrough
"""
Walkthrough
The Docker build process was updated by switching the base image from Amazon Linux to Ubuntu 24.04 and relocating the installation steps from an external shell script into the Dockerfile with explicit package installations and configurations. Additional adjustments include creating TLS directories, updating environment variables, and removing the installation script.
Changes
| Files/Paths | Change Summary |
|---|---|
| images/plbase/Dockerfile | Changed base image to Ubuntu 24.04; replaced shell script with inline package installs and setup for PostgreSQL, Redis, Node.js, Python. |
| images/plbase/plbase-install.sh | Deleted; installation and setup logic moved into Dockerfile. |
| Dockerfile | Updated RUN command to create TLS directories and set permissions; appended PATH environment variable to include /root/.local/bin. |
Suggested reviewers
- nwalters512 """
π Recent review details
Configuration used: .coderabbit.yaml Review profile: CHILL Plan: Pro
π₯ Commits
Reviewing files that changed from the base of the PR and between a7fa7e4217cdac3c5248b8ad8c7c44cc0a89b69f and 5b58a7eee74a7656043b2f151a9e359ab89dfc8f.
π Files selected for processing (1)
images/plbase/Dockerfile(1 hunks)
π§ Files skipped from review as they are similar to previous changes (1)
- images/plbase/Dockerfile
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
πͺ§ Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>, please review it.Explain this complex logic.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai explain this code block.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read src/utils.ts and explain its main purpose.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Support
Need help? Create a ticket on our support page for assistance with any issues or questions.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR.@coderabbitai generate sequence diagramto generate a sequence diagram of the changes in this PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
π thanks for opening this! Please ensure you resolve the merge conflicts so that CI can proceed.
I took the liberty of resolving the merge conflicts. There are some CI issues that will need to be addressed.
I took the liberty of resolving the merge conflicts. There are some CI issues that will need to be addressed.
Thanks. We have an appointment for this afternoon to look at the issues raised.
I'm Looking at the Merge Conflicts
@ThePageGuy please be careful when resolving merge conflicts and getting things up to date with master. You've pulled in a ton of unrelated commits+changes to this PR. If you're not sure how this process generally works, please ask! We on the PL team (and possible @jgfoster) would be happy to help you out.
My recommendation would be to hard-reset back to https://github.com/PrairieLearn/PrairieLearn/pull/12100/commits/5fa4ee76e252f98bf7ec49b6dd6bdc93eaef7d89, force-push, and go from there.
Sorry about the mistake, I would reset it as soon as possible.
I'm still looking at failing tests
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 66.40%. Comparing base (ffaa493) to head (dc9d002).
:warning: Report is 352 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #12100 +/- ##
==========================================
- Coverage 66.40% 66.40% -0.01%
==========================================
Files 759 759
Lines 75257 75257
Branches 7909 7910 +1
==========================================
- Hits 49977 49976 -1
- Misses 25110 25111 +1
Partials 170 170
| Flag | Coverage Ξ | |
|---|---|---|
| javascript | 65.95% <ΓΈ> (-0.01%) |
:arrow_down: |
| python | 81.09% <ΓΈ> (ΓΈ) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
I am in the process of ensuring the JavaScript tests pass. If there are other changes or improvements that can be made, I'm all ears.
DId a quick look, everything is looking better!
@reteps given your work in #12293, this PR is now heavily conflicting with master. Do you think there's still value in this work, and if so, do you want to try to rework this to account for the removal of prairielearn/plbase?
I think we should close this out and reopen with a fresh start given that the removal of prairielearn/plbase means that this PR will have to be heavily reworked. @ThePageGuy if you still have interest in doing this, feel free to open another PR.