Skip to content
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .annotaterb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
position_in_class: before
position_in_test: before
position_in_fixture: before
position_in_factory: before
position_in_serializer: before
position_in_routes: before
show_foreign_keys: false
show_complete_foreign_keys: false
show_indexes: false
exclude_tests: true
exclude_fixtures: true
exclude_factories: true
exclude_serializers: true
hide_limit_column_types: integer,bigint,boolean
hide_default_column_types: json,jsonb,hstore
sort: true
classified_sort: true
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
.rubocop.yml
.ruby-lsp
.vscode/
node_modules/
chart/
Procfile
Procfile.debug
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity

.env.local
.env.test.local
Expand Down
Binary file removed .yarn/install-state.gz
Binary file not shown.
6 changes: 3 additions & 3 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ docker-compose up
### Install dependencies & setup database for local and test environment

```console
./bin/setup
env RAILS_ENV=test ././bin/setup
yarn
./bin/setup --skip-server
env RAILS_ENV=test ./bin/setup --skip-server
npm install
```

### Seed the database
Expand Down
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certifi
&& echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" > /etc/apt/sources.list.d/nodesource.list

# Install packages
RUN apt-get update && apt-get install -y build-essential nodejs libpq-dev fop=1:2.* libsaxon-java libsaxonb-java chromium \
RUN apt-get update && apt-get install -y build-essential nodejs libpq-dev libjemalloc2 fop=1:2.* libsaxon-java libsaxonb-java chromium \
&& apt-get -y install libx11-xcb1 libxcomposite1 libasound2 libatk1.0-0 libatk-bridge2.0-0 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6

# Enable jemalloc for reduced memory usage and latency (Rails 8 default).
RUN ln -s /usr/lib/$(uname -m)-linux-gnu/libjemalloc.so.2 /usr/local/lib/libjemalloc.so
ENV LD_PRELOAD="/usr/local/lib/libjemalloc.so"

# Setup FOP to use saxon xslt parser
RUN sed -i '/find_jars/i \
find_jars saxon saxonb' /usr/bin/fop
Expand All @@ -18,15 +22,16 @@ RUN sed -i 's/^run_java /run_java -Djavax.xml.transform.TransformerFactory=net.s
RUN mkdir /app
WORKDIR /app

RUN npm i -g yarn
RUN npm i npx

# Bundle and cache Ruby gems
COPY Gemfile* ./
RUN bundle config set deployment true
RUN bundle config set without development:test
RUN bundle install

# Install Node dependencies (puppeteer, used by Grover for PDF rendering)
COPY package.json package-lock.json ./
RUN npm ci

# Cache everything
COPY . .

Expand Down
9 changes: 4 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ source 'https://rubygems.org'

ruby '3.3.12'

gem 'rails', '~> 7.1.5'
gem 'rails-i18n'
gem 'rails', '~> 8.1.4'
gem 'rails-i18n', '~> 8.0'

gem 'pg', '~> 1.5'
gem 'with_advisory_lock'
Expand All @@ -17,7 +17,7 @@ gem 'sprockets-rails'
gem 'importmap-rails'
gem 'initials'
gem 'tailwindcss-rails'
gem 'view_component'
gem 'view_component', '~> 4.0'

# Schedulers
gem 'clockwork'
Expand All @@ -41,7 +41,6 @@ gem 'jbuilder'
gem 'rubyzip', require: 'zip'
gem 'jwt'
gem 'stimulus-rails'
gem 'jsbundling-rails'
gem 'pdf-reader'
gem 'grover'
gem 'caxlsx'
Expand All @@ -64,7 +63,7 @@ group :development, :test do
end

group :development do
gem 'annotate'
gem 'annotaterb'
gem 'listen'
gem 'web-console'
gem 'htmlbeautifier'
Expand Down
Loading
Loading