@@ -0,0 +1,12 @@
+#!/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 "$@"
@@ -29,4 +29,8 @@ RUN pip install .
EXPOSE 8080
EXPOSE 9062
-CMD python3 main.py
+COPY fly-entrypoint.sh /entrypoint.sh
+ENTRYPOINT ["/entrypoint.sh"]
+CMD ["python", "main.py"]