-
-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a98cf0f
commit bdc5a06
Showing
1 changed file
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
# This file is how Fly starts the server (configured in fly.toml). | ||
# Before starting the server, we need to run any prisma migrations that haven't yet been run. | ||
#!/bin/sh -ex | ||
|
||
# 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 | ||
|
||
set -ex | ||
# 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 | ||
npx node prisma/seed/prisma/seed.js | ||
npm run start |