-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ikkez
committed
Jan 3, 2025
1 parent
703a3ad
commit f7f0714
Showing
15 changed files
with
147 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/.idea/ | ||
/vendor/ | ||
/composer.lock | ||
/logs/ | ||
/.phpunit.result.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
networks: | ||
internal: | ||
services: | ||
webserver: | ||
container_name: 'f3-psr7' | ||
build: | ||
context: ./docker/bin/php | ||
restart: 'always' | ||
networks: | ||
- internal | ||
volumes: | ||
- ${DOCUMENT_ROOT-./}:/var/www/html:rw | ||
- ${PHP_INI-./docker/config/php/php.ini}:/usr/local/etc/php/php.ini | ||
- ${VHOSTS_DIR-./docker/config/vhosts}:/etc/apache2/sites-enabled | ||
- ${LOG_DIR-./logs/apache2}:/var/log/apache2 | ||
environment: | ||
XDEBUG_MODE: debug | ||
XDEBUG_CONFIG: client_host=host.docker.internal | ||
ports: | ||
- "80:80" | ||
external_links: | ||
- webserver:f3-psr7.localhost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
FROM php:8.2-apache | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
# Update | ||
RUN apt-get -y update --fix-missing && \ | ||
apt-get upgrade -y && \ | ||
apt-get --no-install-recommends install -y apt-utils && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Install tools and libaries | ||
RUN apt-get -y update && \ | ||
apt-get -y --no-install-recommends install --fix-missing \ | ||
wget \ | ||
dialog \ | ||
locales \ | ||
zlib1g-dev \ | ||
libzip-dev \ | ||
libicu-dev && \ | ||
apt-get -y --no-install-recommends install --fix-missing apt-utils \ | ||
build-essential \ | ||
git \ | ||
curl \ | ||
libonig-dev && \ | ||
apt-get -y --no-install-recommends install --fix-missing libcurl4 \ | ||
libcurl4-openssl-dev \ | ||
zip \ | ||
unzip \ | ||
openssl && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
|
||
# Set the locales | ||
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ | ||
locale-gen | ||
|
||
ENV LANG=en_US.UTF-8 \ | ||
LANGUAGE=en_US:en \ | ||
LC_ALL=en_US.UTF-8 | ||
|
||
RUN pecl channel-update pecl.php.net | ||
|
||
# Other PHP extensions | ||
RUN docker-php-ext-install -j$(nproc) intl | ||
RUN docker-php-ext-install zip | ||
|
||
# Install XDebug | ||
RUN pecl install xdebug \ | ||
&& docker-php-ext-enable xdebug | ||
COPY docker-php-ext-xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini | ||
|
||
# Enable apache modules | ||
RUN a2enmod rewrite headers ssl | ||
|
||
# Cleanup | ||
RUN rm -rf /usr/src/* | ||
|
||
RUN usermod -u 1000 www-data | ||
RUN chown -R www-data:www-data /var/www/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
zend_extension=xdebug.so | ||
xdebug.mode = off | ||
xdebug.log_level=0 | ||
xdebug.output_dir=/var/www/html/logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
memory_limit = 32M | ||
short_open_tag = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<VirtualHost *:80> | ||
ServerAdmin webmaster@localhost | ||
DocumentRoot "/var/www/html" | ||
ServerName localhost | ||
<Directory "/var/www/html/"> | ||
AllowOverride all | ||
</Directory> | ||
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters