docker support added

This commit is contained in:
nirpt
2022-08-28 10:24:07 +02:00
parent 5f1534f0be
commit 1194259e6e
7 changed files with 176 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
#!/bin/bash
set -o errexit -o nounset
APP_PATH=/var/www/html
echo "##### coping config file #####"
cp $APP_PATH/install/config/database.php $APP_PATH/config/config.php
echo "##### setting database hostname #####"
sed -i "s/%HOSTNAME%/$DATABASE_HOST/" $APP_PATH/config/config.php
echo "##### setting database username #####"
sed -i "s/%USERNAME%/$DATABASE_USER/" $APP_PATH/config/config.php
echo "##### setting database password #####"
sed -i "s/%PASSWORD%/$DATABASE_PASSWORD/" $APP_PATH/config/config.php
echo "##### setting database name #####"
sed -i "s/%DATABASE%/$DATABASE_NAME/" $APP_PATH/config/config.php
echo "#### Deleting install folder #####"
rm -r $APP_PATH/install
exec apache2-foreground
+1
View File
@@ -0,0 +1 @@
<?php phpinfo( ); ?>
+11
View File
@@ -0,0 +1,11 @@
<VirtualHost *:80>
DocumentRoot /var/www/html/
<Directory “/var/www/html/”>
AllowOverride all
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>