Last active
June 27, 2017 16:29
-
-
Save witzawitz/93fcabd9f2bd0ea9cc7716b615d538b5 to your computer and use it in GitHub Desktop.
Sample configuration for install.sh
This file contains hidden or 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
#!/bin/bash | |
# Which parts of install script should be run. Possible values are: | |
# requirements, php-version, php-extensions, php-ini, composer, db, sphinx, directories, symlinks, migrations, assets. | |
# Any other values will be ignored. | |
config=(requirements php-version php-extensions php-ini composer db sphinx directories symlinks migrations assets) | |
# These extensions should be installed in the system. | |
req_command=( | |
mysql | |
composer | |
ffmpeg | |
ffprobe | |
node | |
npm | |
bower | |
grunt | |
gulp | |
wget | |
php | |
) | |
# These PHP extensions should be installed. | |
php_extensions=( | |
curl | |
gd | |
intl | |
mbstring | |
mcrypt | |
mysqli | |
) | |
# Requirements for PHP ini configuration. | |
php_ini=( | |
'upload_max_filesize >= 8M' | |
'post_max_size >= 8M' | |
'max_execution_time >= 300 == 0' | |
'memory_limit >= 256M' | |
'allow_url_include Off' | |
'date.timezone Europe/Moscow' | |
'default_charset UTF-8' | |
) | |
# Minimum version of PHP. | |
php_version='7.0.10' | |
# Required composer plugins. | |
composer_plugins=( | |
fxp/composer-asset-plugin | |
) | |
# DB settings. | |
# Default database name for auto installation. | |
db_name='video' | |
# Default database username for auto installation. | |
db_username='video' | |
# Base file from which database config should be loaded. | |
db_config_from='common/config/db.default.php' | |
# File to which database config should be written. | |
db_config_to='common/config/db.php' | |
# Sphinx config - to be implemented later. | |
sphinx_config_conf_from='sphinx/sphinx.default.conf' | |
sphinx_config_conf_to='sphinx/sphinx.conf' | |
sphinx_config_php_from='sphinx/sphinx.default.php' | |
sphinx_config_php_to='sphinx/sphinx.php' | |
# Directories that should be created. | |
dirs=( | |
api/runtime | |
backend/runtime | |
backend/web/assets | |
console/runtime | |
data | |
data/video | |
data/img | |
data/img/category | |
data/img/person | |
data/img/redactor | |
data/img/video | |
frontend/runtime | |
frontend/web/assets | |
) | |
# Symlinks that should be created. | |
symlinks=( | |
data/img/category backend/web/img/category | |
data/img/person backend/web/img/person | |
data/img/redactor backend/web/img/redactor | |
data/img/video backend/web/img/video | |
data/video backend/web/video | |
data/img frontend/web/img | |
data/video frontend/web/video | |
) | |
# Config for assets. Sets should be separated with hyphen symbol. | |
# First line in set is directory path to run asset. | |
# Other lines are commands to be run. | |
assets=( | |
api/modules/v1/docs | |
'npm install' | |
'grunt production' | |
- | |
backend/assets | |
'npm install' | |
'grunt production' | |
- | |
frontend/themes/basic | |
'npm install' | |
'gulp build' | |
- | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment