Merge branch 'stage1' of github.com:gradido/gradido_community_server into stage1

This commit is contained in:
einhornimmond 2021-03-05 18:31:57 +01:00 committed by Ulf Gebhardt
commit 6fc3abe358
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD
2 changed files with 45 additions and 0 deletions

View File

@ -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
View 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