File tree Expand file tree Collapse file tree 6 files changed +638
-295
lines changed
Expand file tree Collapse file tree 6 files changed +638
-295
lines changed Original file line number Diff line number Diff line change 1+ /local-mysql-datadir /
2+ /xdebug.ini
Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ COPY .docker/vhost.conf /etc/apache2/sites-available/000-default.conf
3737COPY ./composer.json ./composer.json
3838COPY ./composer.lock ./composer.lock
3939
40+ # entrypoint
41+ COPY .docker/docker-php-entrypoint /usr/local/bin/
42+
4043# www-data:
4144RUN chown -R www-data:www-data ./ && a2enmod rewrite
45+
46+ RUN chmod 755 /usr/local/bin/docker-php-entrypoint
47+ RUN chmod 777 -R storage
48+
49+ # mode-root:
4250USER root
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # ENVIRONMENT VARIABLES -----------------------------------
4+
5+ cp /docker-laravel-api-dev/.env.example /docker-laravel-api-dev/.env
6+
7+ # Xdebug
8+
9+ if [ " ${XDEBUG_MODE} " == 1 ] ; then
10+ echo ' Installing XDebug...'
11+ pecl install xdebug && docker-php-ext-enable xdebug
12+ echo ' XDebug installed!'
13+ fi
14+
15+ # WAIT FOR MYSQL READY -----------------------------------
16+
17+ echo ' Checking MySql...'
18+ while ! (mysqladmin ping --host=$DB_HOST )
19+ do
20+ sleep 1
21+ echo ' Waiting for MySql...'
22+ done
23+ echo ' MySql ready!'
24+
25+ # MIGRATIONS -----------------------------------
26+
27+ echo ' Running Migrations...'
28+ cd /docker-laravel-api-dev
29+ composer install
30+ php artisan migrate
31+ echo ' Migrations done!'
32+
33+
34+ # APACHE -----------------------------------
35+
36+ # first arg is `-f` or `--some-option`
37+ if [ " ${1# -} " != " $1 " ]; then
38+ set -- apache2-foreground " $@ "
39+ fi
40+
41+ exec " $@ "
Original file line number Diff line number Diff line change 1+ zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so
2+
3+ xdebug.remote_enable=1
4+ xdebug.remote_host=XXX.XXX.XXX.XXX
5+ xdebug.remote_log="/tmp/xdebug.log"
You can’t perform that action at this time.
0 commit comments