Skip to content

Commit

Permalink
PUSH
Browse files Browse the repository at this point in the history
-> For god sake i hate
  • Loading branch information
NaysKutzu committed Aug 23, 2024
1 parent 03d6967 commit ba8a6d6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
6 changes: 3 additions & 3 deletions app/Web/Installer/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ public static function Installed(\Router\Router $router): void
*/
if (file_exists(__DIR__ . '/../../../storage/FIRST_INSTALL')) {
$router->add('/', function () {
include __DIR__ . '/../app/Web/Installer/index.php';
include __DIR__ . '/index.php';
});

$router->add('/mysql', function () {
include __DIR__ . '/../app/Web/Installer/mysql.php';
include __DIR__ . '/ mysql.php';
});

$router->add('/install', function () {
include __DIR__ . '/../app/Web/Installer/install.php';
include __DIR__ . '/ install.php';
});

$router->add('/(.*)', function () {
Expand Down
1 change: 1 addition & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ services:
context: ../
dockerfile: docker/php/Dockerfile
container_name: mythicalframework_php
command: php-fpm -R
volumes:
- "app:/var/www/html"
networks:
Expand Down
19 changes: 7 additions & 12 deletions docker/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ FROM php:8.3-fpm-bookworm
RUN apt-get update \
&& apt-get install -y build-essential zlib1g-dev default-mysql-client curl gnupg procps vim git unzip libzip-dev libpq-dev libicu-dev libonig-dev libpng-dev libjpeg-dev libfreetype6-dev

RUN apt-get install nano -y

RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
Expand Down Expand Up @@ -52,25 +54,18 @@ ADD ./docker/php/www.conf /usr/local/etc/php-fpm.d/
RUN apt update && apt upgrade -y && apt install -y git
RUN git clone https://github.com/MythicalLTD/Framework.git /var/www/html

RUN addgroup --gid 1000 mythicalframework && adduser --ingroup mythicalframework --uid 1000 --shell /bin/sh --disabled-password --gecos "" mythicalframework
RUN chown mythicalframework:mythicalframework /var/www/html
#RUN addgroup --gid 1000 mythicalframework && adduser --ingroup mythicalframework --uid 1000 --shell /bin/sh --disabled-password --gecos "" mythicalframework
#RUN chown mythicalframework:mythicalframework /var/www/html

WORKDIR /var/www/html

COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
RUN composer install --no-dev --optimize-autoloader --no-interaction --no-progress --no-suggest


RUN php framework configure

RUN php framework migrate

RUN chmod -R 777 /var/www/html/

#RUN php framework configure
#RUN php framework migrate

# THIS IS LAST

#USER mythicalframework


USER root

4 changes: 2 additions & 2 deletions docker/php/www.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
; will be used.
user = mythicalframework
group = mythicalframework
user = root
group = root

; The address on which to accept FastCGI requests.
; Valid syntaxes are:
Expand Down

0 comments on commit ba8a6d6

Please sign in to comment.