Pārlūkot izejas kodu

activating swap on fly.io

Rodja Trappe 1 gadu atpakaļ
vecāks
revīzija
0d6fa7f9c0
3 mainītis faili ar 7 papildinājumiem un 5 dzēšanām
  1. 2 0
      fly-entrypoint.sh
  2. 2 2
      fly.dockerfile
  3. 3 3
      fly.toml

+ 2 - 0
fly-entrypoint.sh

@@ -7,4 +7,6 @@ if [[ ! -z "$SWAP" ]]; then
   swapon _swapfile
 fi
 
+free -hm
+df -h
 exec "$@"

+ 2 - 2
fly.dockerfile

@@ -2,9 +2,9 @@ FROM python:3.11.3-slim
 
 LABEL maintainer="Zauberzeug GmbH <nicegui@zauberzeug.com>"
 
-RUN pip install itsdangerous prometheus_client isort docutils pandas plotly matplotlib requests
+RUN apt update && apt install -y curl procps
 
-RUN apt update && apt install -y curl 
+RUN pip install itsdangerous prometheus_client isort docutils pandas plotly matplotlib requests
 
 RUN curl -sSL https://install.python-poetry.org | python3 - && \
     cd /usr/local/bin && \

+ 3 - 3
fly.toml

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