#!/usr/bin/env bash

# create mountpoint for db and packagefiles
mkdir mount
if [ ! -d mount/packagefiles ]; then mkdir mount/packagefiles; fi
chown -R www:www mount

# update php max upload size
sed -i /etc/php7/php.ini -e "s/upload_max_filesize = 2M/upload_max_filesize = 20M/"

# update the configured API key
sed -i inc/config.php -e "s/ChangeThisKey/test-test-test/"

# start the php fastcgi daemon
php-fpm7

# go!
nginx
