BACKEND_RUN=docker-compose run --rm backend /bin/bash --login -c

init_db:
	${BACKEND_RUN} "bin/rails db:create"
	${BACKEND_RUN} "bin/rails db:migrate"

stop:
	docker-compose stop

build:
	docker-compose build
	docker-compose run --rm frontend ./node_modules/.bin/yarn
	${BACKEND_RUN} "bundle install --path vendor/bundle"
	
up:
	rm backend/tmp/pids/server.pid
	docker-compose up
	
bash_backend:
	${BACKEND_RUN} "/bin/bash"
	
bash_frontend:
	docker-compose run --rm frontend /bin/bash