mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge branch 'stage1' of github.com:gradido/gradido_community_server into stage1
This commit is contained in:
commit
6fc3abe358
@ -193,6 +193,13 @@ Type::build('datetime')
|
||||
->useImmutable();
|
||||
Type::build('timestamp')
|
||||
->useImmutable();
|
||||
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header('Access-Control-Allow-Methods: POST, GET, PUT, PATCH, DELETE, OPTIONS');
|
||||
header('Access-Control-Allow-Headers: *');
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Custom Inflector rules, can be set to correctly pluralize or singularize
|
||||
|
||||
38
copy_to_www.sh
Executable file
38
copy_to_www.sh
Executable file
@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
[! -z "${FOLDER_NAME}"] && FOLDER_NAME=community_server
|
||||
|
||||
COLOR_GREEN="\033[0;32m"
|
||||
COLOR_YELLOW="\e[33m"
|
||||
COLOR_NONE="\033[0m"
|
||||
|
||||
SCRIPT=`realpath -s $0`
|
||||
SCRIPTPATH=`dirname $SCRIPT`
|
||||
#echo -e "script: $SCRIPT, Path: $SCRIPTPATH "
|
||||
|
||||
cd /var/www/html
|
||||
if [ ! -d "$FOLDER_NAME" ] ; then
|
||||
mkdir $FOLDER_NAME
|
||||
else
|
||||
chmod -R 0755 $FOLDER_NAME
|
||||
fi
|
||||
cd $FOLDER_NAME
|
||||
cp -r $SCRIPTPATH/src .
|
||||
cp -r $SCRIPTPATH/config .
|
||||
cp -r $SCRIPTPATH/composer.json .
|
||||
cp -r $SCRIPTPATH/webroot .
|
||||
composer install
|
||||
if [ ! -d "tmp" ] ; then
|
||||
mkdir tmp
|
||||
chown -R www-data:www-data ./tmp
|
||||
fi
|
||||
if [ ! -d "logs" ] ; then
|
||||
mkdir logs
|
||||
chown -R www-data:www-data ./logs
|
||||
fi
|
||||
|
||||
cd ..
|
||||
chown -R www-data:www-data $FOLDER_NAME
|
||||
chmod -R 0755 $FOLDER_NAME/src
|
||||
chmod -R 0755 $FOLDER_NAME/config
|
||||
chmod -R 0755 $FOLDER_NAME/webroot
|
||||
Loading…
x
Reference in New Issue
Block a user