I fucked up :3
This commit is contained in:
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -1,18 +1,13 @@
|
|||||||
FROM php:8.3-apache
|
FROM php:8.3-apache
|
||||||
|
|
||||||
# Enable mod_rewrite for clean URLs
|
|
||||||
RUN a2enmod rewrite
|
RUN a2enmod rewrite
|
||||||
|
|
||||||
# Install PHP extensions
|
|
||||||
RUN docker-php-ext-install pdo_mysql
|
RUN docker-php-ext-install pdo_mysql
|
||||||
|
|
||||||
# Copy Apache vhost config
|
|
||||||
COPY docker/apache.conf /etc/apache2/sites-available/000-default.conf
|
COPY docker/apache.conf /etc/apache2/sites-available/000-default.conf
|
||||||
|
|
||||||
# Copy all project files into the container
|
|
||||||
COPY . /var/www/html
|
COPY . /var/www/html
|
||||||
|
|
||||||
# Fix permissions
|
|
||||||
RUN chown -R www-data:www-data /var/www/html
|
RUN chown -R www-data:www-data /var/www/html
|
||||||
|
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/html
|
||||||
@@ -5,7 +5,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "8080:80"
|
- "8080:80"
|
||||||
volumes:
|
volumes:
|
||||||
- ".:/var/www/html" # whole project, not just src/
|
- ".:/var/www/html"
|
||||||
environment:
|
environment:
|
||||||
- DB_HOST=${DB_HOST}
|
- DB_HOST=${DB_HOST}
|
||||||
- DB_NAME=${DB_NAME}
|
- DB_NAME=${DB_NAME}
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
namespace src;
|
namespace src;
|
||||||
|
|
||||||
use http\Exception\RuntimeException;
|
|
||||||
|
|
||||||
class View
|
class View
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ class HomeData
|
|||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
public string $pageTitle,
|
public string $pageTitle,
|
||||||
public array $posts // Or even better: public array|PostDTO[] $posts
|
public array $posts
|
||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user