Inizio dockerizzazione

This commit is contained in:
2022-08-29 23:20:16 +02:00
parent b348b3a83d
commit 3d22f4cc6a
851 changed files with 1117 additions and 904 deletions
-43
View File
@@ -1,43 +0,0 @@
#!/bin/bash
PROJECT_NAME="I Fatti di Napoli 2.0"
APPLICATION_BUILDNAME="fdn2"
###########################
####### APACHE DATA #######
###########################
APACHE2_USER="www-data"
APACHE2_GROUP="www-data"
APACHE2_DOCUMENTROOT="/var/www"
###########################
##### SYSTEM DETAILS ######
###########################
SYSTEM_LOG_PATH="/var/log/asdynamics"
SYSTEM_PRIVATE="/home/asdynamics/private"
SYSTEM_STORAGE="/home/asdynamics/storage"
SYSTEM_TMP="/tmp/asdynamics"
###################################
##### APPLICATION ESSENTIALS ######
###################################
APPLICATION_PUBLIC="$APACHE2_DOCUMENTROOT/$APPLICATION_BUILDNAME"
APPLICATION_PRIVATE="$SYSTEM_PRIVATE/$APPLICATION_BUILDNAME"
APPLICATION_STORAGE="$SYSTEM_STORAGE/$APPLICATION_BUILDNAME"
APPLICATION_LOG_PATH="$SYSTEM_LOG_PATH/$APPLICATION_BUILDNAME"
APPLICATION_XSENDFILE_PATH="/tmp/xsend/$APPLICATION_BUILDNAME"
####################################
##### OTHER APPLICATION PATHS ######
####################################
APPLICATION_MEDIA_PATH="$APPLICATION_STORAGE/media"
APPLICATION_BACKUPS_PATH="$APPLICATION_STORAGE/backup"
APPLICATION_TMP_PATH="$SYSTEM_TMP/$APPLICATION_BUILDNAME"
APPLICATION_CONFIG_PATH="$APPLICATION_PRIVATE/common"
APPLICATION_BINARY_PATH="$APPLICATION_PRIVATE/bin"
APPLICATION_CRON_PATH="$APPLICATION_PRIVATE/crontab"
APPLICATION_TASK_PATH="$APPLICATION_PRIVATE/task"
-59
View File
@@ -1,59 +0,0 @@
#!/bin/bash
###########################
#### MYSQL DATABASES ######
###########################
MYSQL_CONNECTION_STRING=""
declare -A MYSQL_DB_CONTENT_TABLES
declare -A MYSQL_DB_CONFIG_TABLES
MYSQL_DB_CONTENT_TABLES=()
MYSQL_DB_CONFIG_TABLES=()
while read line || [ -n "$line" ];
do
if echo $line | grep -P "([=][>]).*([=][>])" &>/dev/null
then
group=$(echo "$line" | sed -r 's/^\s*(\S+)\s*[=][>]\s*(\S+)\s*[=][>]\s*(.+)$/\1/')
table=$(echo "$line" | sed -r 's/^\s*(\S+)\s*[=][>]\s*(\S+)\s*[=][>]\s*(.+)$/\2/')
query=$(echo "$line" | sed -r 's/^\s*(\S+)\s*[=][>]\s*(\S+)\s*[=][>]\s*(.+)$/\3/')
if [ "$group" = "content" ]; then
MYSQL_DB_CONTENT_TABLES["$table"]="$query"
elif [ "$group" = "config" ]; then
MYSQL_DB_CONFIG_TABLES["$table"]="$query"
fi
fi
done < dbCreation.mysql
#MYSQL_DB_CONTENT_TABLES=( ["tizi"]="create table tizi" ["posti"]="create table posti" )
###########################
#### MONGO DATABASES ######
###########################
MONGO_CONNECTION_STRING=""
declare -A MONGO_DB_CONTENT_COLLECTIONS
declare -A MONGO_DB_CONFIG_COLLECTIONS
MONGO_DB_CONTENT_COLLECTIONS=()
MONGO_DB_CONFIG_COLLECTIONS=()
while read line || [ -n "$line" ];
do
if echo $line | grep -P "([=][>]).*([=][>])" &>/dev/null
then
group=$(echo "$line" | sed -r 's/^\s*(\S+)\s*[=][>]\s*(\S+)\s*[=][>]\s*(.+)$/\1/')
table=$(echo "$line" | sed -r 's/^\s*(\S+)\s*[=][>]\s*(\S+)\s*[=][>]\s*(.+)$/\2/')
query=$(echo "$line" | sed -r 's/^\s*(\S+)\s*[=][>]\s*(\S+)\s*[=][>]\s*(.+)$/\3/')
if [ "$group" = "content" ]; then
MONGO_DB_CONTENT_COLLECTIONS["$table"]="$query"
elif [ "$group" = "config" ]; then
MONGO_DB_CONFIG_COLLECTIONS["$table"]="$query"
fi
fi
done < dbCreation.mongo
-5
View File
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<buildpath>
<buildpathentry kind="src" path=""/>
<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
</buildpath>
+26
View File
@@ -0,0 +1,26 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "php",
"request": "launch",
"name": "Launch Running",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9090,
"runtimeExecutable": "/usr/bin/php",
"stopOnEntry": true
},
{
"type": "php",
"request": "launch",
"name": "Listen PHP Docker",
"port": 9090,
"pathMappings": {
"/var/www/fdn2": "${workspaceRoot}/app/public",
"/home/ddninja/private/fdn2": "${workspaceRoot}/app/private",
"/home/ddninja/private/asdphp": "/home/rik/workspaces/didato.ninja/Microservices/asdphp-kube/app/private"
}
}
]
}
+5
View File
@@ -0,0 +1,5 @@
{
"intelephense.environment.includePaths": [
"/home/rik/workspaces/didato.ninja/Microservices/asdphp-kube"
]
}
+2 -4
View File
@@ -1,4 +1,2 @@
I Fatti di Napoli 2.0
Nuova applicazione dei fatti di napoli
Conversione Mobile 2.0
Versione dao mongo aggiornata per utilizzare le nuove librerie php
# I Fatti di Napoli
### Versione dockerizzata
+18
View File
@@ -0,0 +1,18 @@
<VirtualHost *:80>
DocumentRoot /var/www/§PROJECT_BUILDNAME§
<Directory /var/www/§PROJECT_BUILDNAME§>
Options FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
RewriteEngine On
RewriteRule "^(.*)$" "index.php" [NC,L,QSA]
</Directory>
</VirtualHost>
+25
View File
@@ -0,0 +1,25 @@
<VirtualHost *:80>
DocumentRoot /var/www/§PROJECT_BUILDNAME§
<Directory /var/www/§PROJECT_BUILDNAME§>
Options FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}.php -f
RewriteRule "^(.*)$" "$1.php" [NC,L,QSA]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
RewriteRule "^(api/.*)$" "api/index.php" [NC,L,QSA]
</Directory>
</VirtualHost>
+11
View File
@@ -0,0 +1,11 @@
[opcache]
opcache.enable=0
opcache.memory_consumption=128
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=10000
opcache.revalidate_freq=360
opcache.validate_timestamps=0
;opcache.preload=/var/www/§PROJECT_BUILDNAME§/load.php
opcache.preload_user=www-data
;opcache.blacklist_filename=/var/www/eden/index.php
opcache.fast_shutdown=1
+12
View File
@@ -0,0 +1,12 @@
display_errors = Off
display_startup_errors = On
zend.exception_ignore_args = On
error_reporting = E_ALL
session.save_handler=memcached
session.save_path=memcached:11211
session.gc_maxlifetime=1800
# post_max_size = 60M
# upload_max_filesize = 60M
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
function exit_func {
echo "SIGTERM detected"
exit 1
}
trap exit_func SIGTERM SIGINT
ASD_BINDIR="/home/${DDNINJA_AUTHOR}/private/${DDNINJA_BUILDNAME}/bin"
mkdir -p "/tmp/${DDNINJA_AUTHOR}/${DDNINJA_BUILDNAME}"
chown -R www-data:www-data "/tmp/${DDNINJA_AUTHOR}/${DDNINJA_BUILDNAME}"
asdphp-entrypoint & wait
exit $?
@@ -22,10 +22,10 @@ $database->useAuth = true;
$database->connectionString = "mongodb://".$database->user.":".$database->pass."@localhost/".$database->dbName;
$currentSystem = new stdClass();
$currentSystem->storageBaseDir = "/home/asdynamics/storage"; // Il path con storage ecc in cui mettere immagini, file temporanei ecc
$currentSystem->privateBaseDir = "/home/asdynamics/private"; // Il path in cui inserire la cartella con lib, task, binari ecc
$currentSystem->tmpBaseDir = "/tmp/asdynamics";
$currentSystem->logBaseDir = "/var/log/asdynamics"; // Il path dei log....
$currentSystem->storageBaseDir = "/home/ddninja/storage"; // Il path con storage ecc in cui mettere immagini, file temporanei ecc
$currentSystem->privateBaseDir = "/home/ddninja/private"; // Il path in cui inserire la cartella con lib, task, binari ecc
$currentSystem->tmpBaseDir = "/tmp/ddninja";
$currentSystem->logBaseDir = "/var/log/ddninja"; // Il path dei log....
$currentSystem->xSendFileDir = "/tmp/xsend";
// $currentSystem->safeStorage = "/home/cbs/storage";
@@ -20,8 +20,8 @@ $database->connectionString = "mongodb://".$database->user.":".$database->pass."
$currentSystem = new stdClass();
$currentSystem->storageBaseDir = "/home"; // Il path con storage ecc in cui mettere immagini, file temporanei ecc
$currentSystem->privateBaseDir = "/home/asdynamics"; // Il path in cui inserire la cartella con lib, task, binari ecc
$currentSystem->tmpBaseDir = "/tmp/asdynamics";
$currentSystem->privateBaseDir = "/home/ddninja"; // Il path in cui inserire la cartella con lib, task, binari ecc
$currentSystem->tmpBaseDir = "/tmp/ddninja";
$currentSystem->logBaseDir = "/var/log"; // Il path dei log....
$currentSystem->xSendFileDir = "/tmp/xsend";

Some files were not shown because too many files have changed in this diff Show More