-
Notifications
You must be signed in to change notification settings - Fork 0
Copy origin #10
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
Merged
Merged
Copy origin #10
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2a6cd05
Initial Rails 8.1 rewrite of CMES Pi BOOM medical content app
dmitrytrager f2ef911
Add deployment configuration for Docker and systemd
dmitrytrager d450131
Add bin/server script
dmitrytrager 018d3f2
Rename app
dmitrytrager f035e0c
Fix Brakeman security warnings
dmitrytrager a2a899f
Update CI to use RSpec instead of minitest
dmitrytrager ad317e0
Remove test/ directory since our tests are in spec/.
devjona bc454a7
Update CI to use RSpec instead of minitest
dmitrytrager ba88556
Replace bin/dev with bin/server
dmitrytrager 201d90f
Update brakeman
dmitrytrager File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Claude AI Coding Rules | ||
|
|
||
| Follow the coding standards defined in `.agent_rules.md` for all code changes. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # Environment configuration for SkillRx Beacon | ||
| # | ||
| # Copy this file to .env and fill in the values: | ||
| # cp .env.example .env | ||
| # | ||
| # IMPORTANT: Never commit .env to version control! | ||
|
|
||
| # Rails master key (required for production) | ||
| # Generate with: bin/rails secret | ||
| RAILS_MASTER_KEY= | ||
|
|
||
| # Rails environment (development, test, production) | ||
| RAILS_ENV=production | ||
|
|
||
| # Server port (default: 3000 for development, 80 for Docker with Thruster) | ||
| PORT=3000 | ||
|
|
||
| # Content directory path (where medical content files are stored) | ||
| CONTENT_PATH=/path/to/content | ||
|
|
||
| # Optional: Database path (defaults to storage/production.sqlite3) | ||
| # DATABASE_PATH=/var/lib/skillrx/production.sqlite3 | ||
|
|
||
| # Optional: Log level (debug, info, warn, error, fatal) | ||
| # RAILS_LOG_LEVEL=info | ||
|
|
||
| # Optional: Enable Solid Queue in Puma process | ||
| SOLID_QUEUE_IN_PUMA=1 | ||
|
|
||
| # Optional: Number of Puma threads (default: 3) | ||
| # RAILS_MAX_THREADS=3 |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| --require spec_helper |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 4.0.0 | ||
| ruby-4.0.1 |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # syntax=docker/dockerfile:1 | ||
| # check=error=true | ||
| # | ||
| # Simplified Dockerfile for resource-constrained environments (Raspberry Pi, etc.) | ||
| # Does not use Thruster - runs Puma directly on port 3000 | ||
| # | ||
| # Build: | ||
| # docker build -f Dockerfile.simple -t skillrx . | ||
| # | ||
| # Run: | ||
| # docker run -d -p 3000:3000 \ | ||
| # -e RAILS_MASTER_KEY=<your-key> \ | ||
| # -v skillrx_storage:/rails/storage \ | ||
| # --name skillrx skillrx | ||
|
|
||
| ARG RUBY_VERSION=4.0.1 | ||
| FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base | ||
|
|
||
| WORKDIR /rails | ||
|
|
||
| # Install minimal packages (no jemalloc for smaller image) | ||
| RUN apt-get update -qq && \ | ||
| apt-get install --no-install-recommends -y curl sqlite3 && \ | ||
| rm -rf /var/lib/apt/lists /var/cache/apt/archives | ||
|
|
||
| ENV RAILS_ENV="production" \ | ||
| BUNDLE_DEPLOYMENT="1" \ | ||
| BUNDLE_PATH="/usr/local/bundle" \ | ||
| BUNDLE_WITHOUT="development:test" | ||
|
|
||
| # Build stage | ||
| FROM base AS build | ||
|
|
||
| RUN apt-get update -qq && \ | ||
| apt-get install --no-install-recommends -y build-essential git libyaml-dev pkg-config && \ | ||
| rm -rf /var/lib/apt/lists /var/cache/apt/archives | ||
|
|
||
| COPY vendor/* ./vendor/ | ||
| COPY Gemfile Gemfile.lock ./ | ||
| RUN bundle install && \ | ||
| rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git | ||
|
|
||
| COPY . . | ||
|
|
||
| RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile | ||
|
|
||
| # Final stage | ||
| FROM base | ||
|
|
||
| RUN groupadd --system --gid 1000 rails && \ | ||
| useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash | ||
| USER 1000:1000 | ||
|
|
||
| COPY --chown=rails:rails --from=build "${BUNDLE_PATH}" "${BUNDLE_PATH}" | ||
| COPY --chown=rails:rails --from=build /rails /rails | ||
|
|
||
| ENTRYPOINT ["/rails/bin/docker-entrypoint"] | ||
|
|
||
| EXPOSE 3000 | ||
| CMD ["./bin/rails", "server", "-b", "0.0.0.0", "-p", "3000"] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,33 +1,72 @@ | ||
| source "https://gem.coop" | ||
| source "https://rubygems.org" | ||
|
|
||
| gem "bootsnap", require: false | ||
| gem "image_processing", "~> 1.2" | ||
| gem "importmap-rails" | ||
| gem "jbuilder" | ||
| gem "kamal", require: false | ||
| # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" | ||
| gem "rails", "~> 8.1.2" | ||
| # The modern asset pipeline for Rails [https://github.com/rails/propshaft] | ||
| gem "propshaft" | ||
| gem "pg", "~> 1.1" | ||
| # Use sqlite3 as the database for Active Record | ||
| gem "sqlite3", ">= 2.1" | ||
| # Use the Puma web server [https://github.com/puma/puma] | ||
| gem "puma", ">= 5.0" | ||
| gem "rails", "~> 8.1.2" | ||
| # Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails] | ||
| gem "importmap-rails" | ||
| # Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev] | ||
| gem "turbo-rails" | ||
| gem "solid_cache" | ||
| gem "solid_queue" | ||
| gem "solid_cable" | ||
| # Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev] | ||
| gem "stimulus-rails" | ||
| # Use Tailwind CSS [https://github.com/rails/tailwindcss-rails] | ||
| gem "tailwindcss-rails" | ||
| gem "thruster", require: false | ||
|
|
||
| # Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword] | ||
| # gem "bcrypt", "~> 3.1.7" | ||
|
|
||
| # Windows does not include zoneinfo files, so bundle the tzinfo-data gem | ||
| gem "tzinfo-data", platforms: %i[ windows jruby ] | ||
|
|
||
| # Use the database-backed adapters for Rails.cache, Active Job, and Action Cable | ||
| gem "solid_cache" | ||
| gem "solid_queue" | ||
| gem "solid_cable" | ||
|
|
||
| # Reduces boot times through caching; required in config/boot.rb | ||
| gem "bootsnap", require: false | ||
|
|
||
| # Deploy this application anywhere as a Docker container [https://kamal-deploy.org] | ||
| gem "kamal", require: false | ||
|
|
||
| # Add HTTP asset caching/compression and X-Sendfile acceleration to Puma [https://github.com/basecamp/thruster/] | ||
| gem "thruster", require: false | ||
|
|
||
| # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] | ||
| gem "image_processing", "~> 1.2" | ||
|
|
||
| group :development, :test do | ||
| gem "brakeman", require: false | ||
| gem "bundler-audit", require: false | ||
| # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem | ||
| gem "debug", platforms: %i[ mri windows ], require: "debug/prelude" | ||
|
|
||
| # Audits gems for known security defects (use config/bundler-audit.yml to ignore issues) | ||
| gem "bundler-audit", require: false | ||
|
|
||
| # Static analysis for security vulnerabilities [https://brakemanscanner.org/] | ||
| gem "brakeman", require: false | ||
|
|
||
| # Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/] | ||
| gem "rubocop-rails-omakase", require: false | ||
| end | ||
|
|
||
| group :development do | ||
| # Use console on exceptions pages [https://github.com/rails/web-console] | ||
| gem "web-console" | ||
| end | ||
|
|
||
| group :test do | ||
| # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing] | ||
| gem "capybara" | ||
| gem "selenium-webdriver" | ||
| end | ||
|
|
||
| gem "rspec-rails", "~> 8.0", groups: [ :development, :test ] | ||
|
|
||
| gem "factory_bot_rails", "~> 6.5", groups: [ :development, :test ] | ||
|
|
||
| gem "bcrypt", "~> 3.1" |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're using Alpine in the Dockerfiles but we can always adjust this later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this is for host machine on CI, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I don't know if matters; as long as it works because sometimes it seems package names between distros vary.