Initial code base for Sandstorm.IO support. Very beta.

This commit is contained in:
James Cole
2017-02-04 03:04:55 +01:00
parent df1da32745
commit 96b5d174d1
17 changed files with 1897 additions and 0 deletions

21
.sandstorm/build.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
# Checks if there's a composer.json, and if so, installs/runs composer.
# Only runs when we connect the app to sandstorm (so once).
set -euo pipefail
cd /opt/app
cp .env.sandstorm .env
if [ -f /opt/app/composer.json ] ; then
if [ ! -f composer.phar ] ; then
curl -sS https://getcomposer.org/installer | php
fi
php composer.phar install --no-dev --no-suggest
fi
# link storage folder
rm -rf /opt/app/storage
ln -s /var/storage /opt/app