From 7e7f39c0ebe25218be084c5cb13d25f891897faa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Thu, 2 May 2024 22:18:24 +0200 Subject: [PATCH] feat: set swapfile size in `fly.toml` --- fly.toml | 1 + start.sh | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/fly.toml b/fly.toml index 61ed0817..8a768eb7 100644 --- a/fly.toml +++ b/fly.toml @@ -3,6 +3,7 @@ app = "indie-stack-template" kill_signal = "SIGINT" kill_timeout = 5 processes = [] +swap_size_mb = 512 [experimental] allowed_public_ports = [] diff --git a/start.sh b/start.sh index 4488fd10..109a13c3 100755 --- a/start.sh +++ b/start.sh @@ -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