Skip to content

Commit

Permalink
MRI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gdiggs committed Jul 17, 2024
1 parent dd4835a commit c291d38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ RUN --mount=type=cache,id=prod-apt-cache,sharing=locked,target=/var/cache/apt \

# copy installed gems
COPY --from=gems /app /app
COPY --from=gems /usr/lib/fullstaq-ruby/versions /usr/lib/fullstaq-ruby/versions
COPY --from=gems /usr/local/bundle /usr/local/bundle
COPY --from=gems /usr/local /usr/local

# copy installed node modules
COPY --from=node_modules /app/node_modules /app/node_modules
Expand Down
16 changes: 1 addition & 15 deletions lib/tasks/fly.rake
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,7 @@ namespace :fly do
# - full access to secrets, databases
# - failures here result in VM being stated, shutdown, and rolled back
# to last successful deploy (if any).
task server: :swapfile do
task :server do
sh "bin/rails server"
end

# optional SWAPFILE task:
# - adjust fallocate size as needed
# - performance critical applications should scale memory to the
# point where swap is rarely used. 'fly scale help' for details.
# - disable by removing dependency on the :server task, thus:
# task :server do
task swapfile: :environment do
sh "fallocate -l 512M /swapfile"
sh "chmod 0600 /swapfile"
sh "mkswap /swapfile"
sh "echo 10 > /proc/sys/vm/swappiness"
sh "swapon /swapfile"
end
end

0 comments on commit c291d38

Please sign in to comment.