build: add bash for local-development
This commit is contained in:
		
							parent
							
								
									893ad31abc
								
							
						
					
					
						commit
						3a5c727e3e
					
				
							
								
								
									
										21
									
								
								bin/develop.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										21
									
								
								bin/develop.sh
									
									
									
									
									
										Executable 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
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user