소스 검색

using swap-feature from fly.io

Rodja Trappe 1 년 전
부모
커밋
97d4027325
2개의 변경된 파일2개의 추가작업 그리고 9개의 파일을 삭제
  1. 0 6
      fly-entrypoint.sh
  2. 2 3
      fly.toml

+ 0 - 6
fly-entrypoint.sh

@@ -1,12 +1,6 @@
 #!/bin/bash
 set -e
 
-if [[ ! -z "$SWAP" ]]; then
-  fallocate -l $(($(stat -f -c "(%a*%s/10)*7" .))) _swapfile
-  mkswap _swapfile
-  swapon _swapfile
-fi
-
 free -hm
 df -h
 exec "$@"

+ 2 - 3
fly.toml

@@ -7,6 +7,8 @@ app = "nicegui"
 primary_region = "fra"
 kill_signal = "SIGTERM"
 kill_timeout = "5s"
+swap_size_mb = 2048
+
 
 [build]
   dockerfile = "fly.dockerfile"
@@ -17,9 +19,6 @@ kill_timeout = "5s"
 [processes]
   app = ""
 
-[env]
-  SWAP = "true"
-
 [[services]]
   protocol = "tcp"
   internal_port = 8080