Inital commit

This commit is contained in:
2020-11-19 15:36:28 +01:00
parent 71f32f83d3
commit 66ce4ee218
18077 changed files with 2166122 additions and 35184 deletions

29
docker/php/Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
FROM php:5.6-apache
COPY docker-php-pecl-install /usr/local/bin/
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
openssl \
libpng12-dev \
libicu-dev \
git \
zip \
libzip-dev \
&& docker-php-ext-install intl pdo_mysql openssl mbstring zip calendar \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd \
&& docker-php-pecl-install xdebug-2.3.3
# Setup and install composer
RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer \
&& curl -o /tmp/composer-setup.sig https://composer.github.io/installer.sig \
&& php -r "if (hash('SHA384', file_get_contents('/tmp/composer-setup.php')) !== trim(file_get_contents('/tmp/composer-setup.sig'))) { unlink('/tmp/composer-setup.php'); echo 'Invalid installer' . PHP_EOL; exit(1); }" \
&& php /tmp/composer-setup.php \
&& chmod +x composer.phar \
&& mv composer.phar /usr/local/bin/composer
RUN a2enmod rewrite
RUN usermod -u 1000 www-data
COPY config/php.ini /usr/local/etc/php/
COPY config/vhost/vhost.conf /etc/apache2/sites-enabled/

14
docker/php/config/php.ini Normal file
View File

@@ -0,0 +1,14 @@
post_max_size=20M
html_errors=On
display_errors=On
date.timezone=Europe/Paris
memory_limit=-1
[xdebug]
xdebug.cli_color=1
xdebug.var_display_max_children=-1
xdebug.var_display_max_depth=-1
xdebug.var_display_max_data=-1
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_port=9000

View File

@@ -0,0 +1,11 @@
<VirtualHost *:80>
DocumentRoot /var/www/html/web
SetEnv SYMFONY_ENV "dev"
<Directory /var/www/html/web>
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

View File

@@ -0,0 +1,36 @@
#!/bin/bash
set -e
usage() {
echo "usage: $0 [channel/]<package> ..."
echo " ie: $0 uploadprogress oauth-1.2.3"
}
if [ $# -eq 0 ]; then
usage >&2
exit 1
fi
pecl install "$@"
while [ $# -gt 0 ]; do
ext="$1"
ext=$(echo "$ext" | cut -d- -f1)
ext=$(echo "$ext" | cut -d\/ -f2)
shift
for module in $(find /usr/local/lib/php/extensions -name "$ext.so"); do
ini="/usr/local/etc/php/conf.d/docker-php-pecl-$ext.ini"
if grep -q zend_extension_entry "$module"; then
# https://wiki.php.net/internals/extensions#loading_zend_extensions
line="zend_extension=$(readlink -f "$module")"
else
line="extension=$(basename "$module")"
fi
if ! grep -q "$line" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done
done
rm -rf /tmp/*