This repository has been archived on 2025-12-11. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
fullstack-open/part3/phonebook/node_modules/@flydotio/dockerfile/templates/docker-entrypoint.ejs
Andrew Trieu fa5d8255d6 Add part3
2023-05-23 08:05:53 +03:00

21 lines
431 B
Plaintext
Executable File

#!/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 "${@}"