Prepare an example on how to run MFYNAB in Docker#56
Open
davidstosik wants to merge 2 commits into
Open
Conversation
davidstosik
force-pushed
the
sto/docker
branch
from
February 27, 2025 15:01
844d229 to
0b49163
Compare
There was a problem hiding this comment.
PR Overview
This PR prepares an example to run MFYNAB in Docker, laying the groundwork for a deploy process based on Kamal.
- Gemfile updated to pull MFYNAB from a specific GitHub branch
- Adjustments to Ferrum configuration in the session for Docker compatibility
- Freshness limit for account status reduced and README updated with Docker run instructions
Reviewed Changes
| File | Description |
|---|---|
| docker_example/Gemfile | Added gem dependency with a FIXME note to update to the latest RubyGems release |
| lib/mfynab/money_forward/session.rb | Updated Ferrum browser instantiation to support running Chromium as root in Docker |
| lib/mfynab/money_forward/account_status.rb | Adjusted the freshness limit from 1 day to 1 hour |
| README.md | Extended documentation with instructions on running MFYNAB with cron and Docker |
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
lib/mfynab/money_forward/account_status.rb:70
- The freshness limit has been reduced from 24 hours to 1 hour. Confirm that this shorter interval meets the intended caching or update frequency requirements.
FRESHNESS_LIMIT = 60 * 60 # 1 hour
Comment on lines
+81
to
+84
| # FIXME: this was needed to be able to run Chromium headless | ||
| # within Docker as root, but I'd rather not rely on it. | ||
| browser_options: { "no-sandbox": nil }, |
There was a problem hiding this comment.
Using the 'no-sandbox' option can expose security vulnerabilities. Consider conditionally enabling it only when running in Docker by checking an environment variable to better isolate production and container-specific behavior.
Suggested change
| # FIXME: this was needed to be able to run Chromium headless | |
| # within Docker as root, but I'd rather not rely on it. | |
| browser_options: { "no-sandbox": nil }, | |
| browser_options: ENV.key?("IN_DOCKER") ? { "no-sandbox": nil } : {}, | |
| # FIXME: this was needed to be able to run Chromium headless | |
| # within Docker as root, but I'd rather not rely on it. |
davidstosik
force-pushed
the
sto/docker
branch
2 times, most recently
from
February 28, 2025 00:24
73f36f2 to
c077317
Compare
davidstosik
force-pushed
the
sto/docker
branch
3 times, most recently
from
March 25, 2025 13:52
d7d57fb to
1fd0451
Compare
Also don't commit Gemfile.lock in that example, since versions should follow with time.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First step towards a deploy process based on Kamal: getting MFYNAB to run in a Docker container.
The hardest parts were:
Note this PR is based on
sto/refresh-mf-accounts.