Skip to content

Commit

Permalink
Merge pull request #2269 from tarlepp/chore(env)/fix-starting
Browse files Browse the repository at this point in the history
Chore(env) - Fixed `Device or resource busy` issue within development environment
  • Loading branch information
tarlepp committed Apr 14, 2023
2 parents 8c5f3d4 + 2433b2e commit 0f3cf90
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion docker-compose.yml
Expand Up @@ -15,7 +15,6 @@ services:
- mariadb
volumes:
- ./:/app:cached
- ./docker/php/php-dev.ini:/usr/local/etc/php/php.ini
tmpfs:
- /app/var/:uid=$HOST_UID,gid=$HOST_GID
environment:
Expand Down
10 changes: 7 additions & 3 deletions docker-entrypoint-dev.sh
Expand Up @@ -4,9 +4,12 @@ set -e
#
# If we're starting web-server we need to do following:
# 0) Basic linting of current JSON configuration file
# 1) Modify docker-php-ext-xdebug.ini file to contain correct remote host value, note that for mac we need to use
# another value within this. Also we want to export host IP so that we can use that within `check.php` to check
# that current environment is compatible with Symfony.
# 1) Determine docker container IP address, so that we can use it within
# XDebug configuration. Copy php.ini file to correct location and modify
# it to contain correct remote host value. With this we don't need to
# build container each time we want to change something in php.ini file.
# Also we want to export host IP so that we can use that within
# `check.php` to check that current environment is compatible with Symfony
# 2) Install all dependencies
# 3) Generate JWT encryption keys
# 4) Create database if it not exists yet
Expand All @@ -26,6 +29,7 @@ else
HOST="docker.for.mac.localhost"
fi

cp /app/docker/php/php-dev.ini /usr/local/etc/php/php.ini
sed -i "s/xdebug\.client_host \=.*/xdebug\.client_host\ = $HOST/g" /usr/local/etc/php/php.ini

DOCKER_IP=$(/sbin/ip route|awk '/default/ { print $3 }')
Expand Down

0 comments on commit 0f3cf90

Please sign in to comment.