Skip to content

Commit

Permalink
feat: set swapfile size in fly.toml (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey authored May 17, 2024
1 parent fb3c321 commit 1861e53
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
1 change: 1 addition & 0 deletions fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ app = "indie-stack-template"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
swap_size_mb = 512

[experimental]
allowed_public_ports = []
Expand Down
8 changes: 0 additions & 8 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,5 @@
# run, which is why this file exists in the first place.
# Learn more: https://community.fly.io/t/sqlite-not-getting-setup-properly/4386

# allocate swap space
fallocate -l 512M /swapfile
chmod 0600 /swapfile
mkswap /swapfile
echo 10 > /proc/sys/vm/swappiness
swapon /swapfile
echo 1 > /proc/sys/vm/overcommit_memory

npx prisma migrate deploy
npm run start

0 comments on commit 1861e53

Please sign in to comment.