Updating docker setup with dockerize-me upstream. Install blackfire

parent dfec61bb
......@@ -11,6 +11,14 @@ if [ $# -gt 0 ]; then
shift 1
EXEC_CMD="cd /var/www/html && php artisan $@"
$COMPOSE exec app bash -c "$EXEC_CMD"
elif [ "$1" == "bin/console" ]; then
shift 1
EXEC_CMD="cd /var/www/html && php bin/console $@"
$COMPOSE exec app bash -c "$EXEC_CMD"
elif [ "$1" == "app/console" ]; then
shift 1
EXEC_CMD="cd /var/www/html && php app/console $@"
$COMPOSE exec app bash -c "$EXEC_CMD"
elif [ "$1" == "test" ]; then
shift 1
$COMPOSE run --rm -w /var/www/html app ./vendor/bin/phpunit $@
......
......@@ -43,6 +43,13 @@ services:
volumes:
- .:/var/www/html
blackfire:
image: blackfire/blackfire
environment:
BLACKFIRE_SERVER_ID:
BLACKFIRE_SERVER_TOKEN:
networks:
- asgard_net
volumes:
redisdata:
......
......@@ -32,6 +32,12 @@ RUN add-apt-repository ppa:nginx/stable \
curl \
&& mkdir /run/php \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp \
&& mv /tmp/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > /etc/php/7.0/mods-available/blackfire.ini \
&& phpenmod blackfire \
&& apt-get remove -y --purge software-properties-common curl \
&& apt-get clean \
&& apt-get autoremove -y \
......@@ -54,9 +60,9 @@ RUN openssl genrsa -des3 -passout pass:x -out server.pass.key 2048 \
&& cp server.key /etc/ssl/private/ \
&& rm -rf /tmp/certgen
EXPOSE 80
EXPOSE 443
WORKDIR /var/www/html
CMD ["supervisord"]
FROM mysql:5.7
MAINTAINER Julien Tant <julien@craftyx.fr>
......@@ -2,4 +2,4 @@ FROM node:alpine
MAINTAINER Julien Tant <julien@craftyx.fr>
RUN npm update -g
\ No newline at end of file
RUN npm update -g
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment