22 lines
536 B
Bash
22 lines
536 B
Bash
|
#!/usr/bin/env sh
|
||
|
|
||
|
set -ex
|
||
|
|
||
|
docker compose build
|
||
|
|
||
|
# npm
|
||
|
docker compose run -it php-fpm npm install
|
||
|
docker compose run -it php-fpm /var/www/html/node_modules/.bin/encore dev
|
||
|
|
||
|
# composer
|
||
|
docker compose run -it php-fpm composer install
|
||
|
|
||
|
# database
|
||
|
docker compose run -it php-fpm bin/console --no-interaction doctrine:migrations:migrate
|
||
|
docker compose run -it php-fpm bin/console --env="test" --no-interaction doctrine:migrations:migrate
|
||
|
|
||
|
# run containers (and build again)
|
||
|
if [ "$NO_EXECUTE" != "1" ]; then
|
||
|
docker compose up --build
|
||
|
fi
|