translaite/start.sh

20 lines
550 B
Bash
Raw Normal View History

#!/bin/sh
set -ex
2023-08-07 10:52:44 +02:00
# This file is how Fly starts the server (configured in fly.toml). Before starting
# the server though, we need to run any prisma migrations that haven't yet been
# 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
2023-08-07 10:52:44 +02:00
npx prisma migrate deploy
yarn start