diff --git a/.gitignore b/.gitignore index b929d822..7b524f85 100755 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -dockerfiles/mariadb/data \ No newline at end of file +dockerfiles/mariadb/data +.installed \ No newline at end of file diff --git a/backend/Dockerfile b/backend/Dockerfile index e8330f22..026c754c 100755 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -27,6 +27,9 @@ RUN apt-get update && apt-get install -y \ curl \ zip +RUN chown -R www-data:www-data /var/www/html \ + && chmod -R 755 /var/www/html + # Install Composer COPY --from=composer:latest /usr/bin/composer /usr/bin/composer diff --git a/backend/public/index.php b/backend/public/index.php index 12990c7e..6a343c5f 100755 --- a/backend/public/index.php +++ b/backend/public/index.php @@ -46,7 +46,7 @@ define('APP_SOURCECODE_DIR', APP_DIR . 'app'); define('APP_ROUTES_DIR', APP_SOURCECODE_DIR . '/Api'); -/**d +/** * Require the kernel. */ require_once APP_DIR . '/boot/kernel.php'; diff --git a/backend/storage/.env b/backend/storage/.env index 5e002af1..feab0c3d 100755 --- a/backend/storage/.env +++ b/backend/storage/.env @@ -4,5 +4,5 @@ DATABASE_USER=mythical DATABASE_PASSWORD="Pizza2007!" DATABASE_DATABASE=mythicalclient DATABASE_ENCRYPTION=xchacha20 -DATABASE_ENCRYPTION_KEY="zKZ7//AocUD2wCuzjW5rdTbb8FvGBgKTZ8iCATslZ/8=" +DATABASE_ENCRYPTION_KEY="Wk2nAV0QHORNEg8/ZQQBeqdW4p2G8lp747RpP6T9yxs=" REDIS_PASSWORD="eufefwefwefw" \ No newline at end of file diff --git a/install.bash b/install.bash index 751f870e..b03cda17 100755 --- a/install.bash +++ b/install.bash @@ -29,6 +29,14 @@ chmod -R 777 ./ docker exec mythicalclient_backend bash -c "php mythicalclient migrate" # Reset the encryption key -docker exec mythicalclient_backend bash -c "php mythicalclient keyRegen -force" - +# Check if the installation has already been completed +INSTALL_FLAG=".installed" + +if [ ! -f "$INSTALL_FLAG" ]; then + # Run the installation steps + touch "$INSTALL_FLAG" + docker exec mythicalclient_backend bash -c "php mythicalclient keyRegen -force" +else + echo "Installation already completed. Skipping..." +fi