Add part3

This commit is contained in:
Andrew Trieu
2023-05-23 08:05:53 +03:00
parent 41757b9830
commit fa5d8255d6
1296 changed files with 167750 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
#!/bin/bash -e
<% if (options.swap) { -%>
# allocate swap space
fallocate -l <%= options.swap %> /swapfile
chmod 0600 /swapfile
mkswap /swapfile
echo 10 > /proc/sys/vm/swappiness
swapon /swapfile
echo 1 > /proc/sys/vm/overcommit_memory
<% } -%>
<% if (prisma) { -%>
# If running the web server then migrate existing database
if [ "${*}" == "{{ .packager }} run start" ]; then
npx prisma migrate deploy
fi
<% } -%>
exec "${@}"