Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add opcache, xsl and intl, share 3306 port of db container and adapt logs shipping for sf3 #92

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ services:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
ports:
- 3306:3306
php:
build:
context: php7-fpm
args:
TIMEZONE: ${TIMEZONE}
volumes:
- ${SYMFONY_APP_PATH}:/var/www/symfony
- ./logs/symfony:/var/www/symfony/app/logs
- ./logs/symfony:/var/www/symfony/var/logs
- ${SYMFONY_APP_PATH}:/var/www/symfony/var/logs
ports:
- 9000:9000
nginx:
build: nginx
ports:
Expand Down
4 changes: 2 additions & 2 deletions elk/logstash/logstash.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ input {
}
file {
type => "symfony_dev"
path => "/var/www/symfony/app/logs/dev.log"
path => "/var/www/symfony/var/logs/dev.log"
start_position => beginning
}
file {
type => "symfony_prod"
path => "/var/www/symfony/app/logs/prod.log"
path => "/var/www/symfony/var/logs/prod.log"
start_position => beginning
}
}
Expand Down
16 changes: 12 additions & 4 deletions php7-fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ MAINTAINER Maxence POUTORD <[email protected]>
RUN apt-get update && apt-get install -y \
openssl \
git \
unzip
unzip \
libpng-dev \
g++ \
libicu-dev \
libxslt-dev


# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
Expand All @@ -19,7 +24,7 @@ RUN printf '[PHP]\ndate.timezone = "%s"\n', ${TIMEZONE} > /usr/local/etc/php/con
RUN "date"

# Type docker-php-ext-install to see available extensions
RUN docker-php-ext-install pdo pdo_mysql
RUN docker-php-ext-install pdo pdo_mysql gd exif opcache && docker-php-ext-enable opcache


# install xdebug
Expand All @@ -32,9 +37,12 @@ RUN echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xd
RUN echo "xdebug.remote_connect_back=1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.idekey=\"PHPSTORM\"" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.remote_port=9001" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN docker-php-ext-configure intl
RUN docker-php-ext-install intl
RUN docker-php-ext-configure xsl
RUN docker-php-ext-install xsl


RUN echo 'alias sf="php app/console"' >> ~/.bashrc
RUN echo 'alias sf3="php bin/console"' >> ~/.bashrc
RUN echo 'alias sf="php bin/console"' >> ~/.bashrc

WORKDIR /var/www/symfony