build: add bash for local-development

This commit is contained in:
Ondrej Vlach 2024-08-04 12:01:45 +02:00
parent 893ad31abc
commit 3a5c727e3e
No known key found for this signature in database
GPG Key ID: 7F141CDACEDEE2DE

21
bin/develop.sh Executable file
View File

@ -0,0 +1,21 @@
#!/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