Skip to content

Commit

Permalink
Updating docker setup with dockerize-me upstream. Install blackfire
Browse files Browse the repository at this point in the history
  • Loading branch information
nWidart committed Sep 20, 2017
1 parent dfec61b commit 8c2025c
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
8 changes: 8 additions & 0 deletions dcp
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@
Expand Down
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 8 additions & 2 deletions docker/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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"]
1 change: 0 additions & 1 deletion docker/mysql/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
FROM mysql:5.7

MAINTAINER Julien Tant <[email protected]>
2 changes: 1 addition & 1 deletion docker/node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ FROM node:alpine

MAINTAINER Julien Tant <[email protected]>

RUN npm update -g
RUN npm update -g

0 comments on commit 8c2025c

Please sign in to comment.