77 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			77 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
| help:
 | |
| 	@echo "make [clean dev-front prod dev-back dev]"
 | |
| 
 | |
| clean: 
 | |
| 	@cp config/frontdev.env front/MyINPulse-front/.env
 | |
| 	@cp config/frontdev.env .env
 | |
| 	@cp config/frontdev.env MyINPulse-back/.env
 | |
| 	@cp config/prod.docker-compose.yaml docker-compose.yaml
 | |
| 	@docker compose down
 | |
| 	@rm -f docker-compose.yaml
 | |
| 	@rm -f .env
 | |
| 	@rm -f front/MyINPulse-front/.env
 | |
| 	@rm -f MyINPulse-back/.env
 | |
| 
 | |
| # Install npm packages
 | |
| front/MyINPulse-front/.installed:
 | |
| 	@cd ./front/MyINPulse-front/ && npm i && touch .installed
 | |
| 
 | |
| 
 | |
| vite: ./front/MyINPulse-front/.installed
 | |
| 
 | |
| keycloak: ./keycloak/.installed
 | |
| 
 | |
| keycloak/.installed:
 | |
| 	@echo "running one time install"
 | |
| 	@cd keycloak/CAS && sudo sh build.sh
 | |
| 	@touch ./keycloak/.installed
 | |
| 
 | |
| dev-front: clean vite keycloak
 | |
| 	@cp config/frontdev.env front/MyINPulse-front/.env
 | |
| 	@cp config/frontdev.env .env
 | |
| 	@cp config/frontdev.env MyINPulse-back/.env
 | |
| 	@cp config/frontdev.docker-compose.yaml docker-compose.yaml
 | |
| 	@docker compose up -d --build
 | |
| 	@cd ./front/MyINPulse-front/ && npm run dev
 | |
| 	@echo "cd MyINPulse-back" && echo 'export $$(cat .env | xargs)'
 | |
| 	@echo "./gradlew bootRun --args='--server.port=8081'"
 | |
| 
 | |
| prod: clean keycloak
 | |
| 	@cp config/prod.env front/MyINPulse-front/.env
 | |
| 	@cp config/prod.env .env
 | |
| 	@cp config/prod.env .env
 | |
| 	@cp config/prod.docker-compose.yaml docker-compose.yaml
 | |
| 	@docker compose up -d --build
 | |
| 	
 | |
| 
 | |
| 
 | |
| 
 | |
| dev-back: keycloak
 | |
| 	@cp config/backdev.env front/MyINPulse-front/.env
 | |
| 	@cp config/backdev.env .env
 | |
| 	@cp config/backdev.env MyINPulse-back/.env
 | |
| 	@cp config/backdev.docker-compose.yaml docker-compose.yaml
 | |
| 	@docker compose up -d --build
 | |
| 	@echo "cd MyINPulse-back" && echo 'export $$(cat .env | xargs)'
 | |
| 	@echo "./gradlew bootRun --args='--server.port=8081'"
 | |
| 	
 | |
| dev: clean vite keycloak
 | |
| 	@cp config/dev.env front/MyINPulse-front/.env
 | |
| 	@cp config/dev.env .env
 | |
| 	@cp config/dev.env MyINPulse-back/.env
 | |
| 	@cp config/dev.docker-compose.yaml docker-compose.yaml
 | |
| 	@docker compose up -d --build
 | |
| 	@echo "cd MyINPulse-back" && echo 'export $$(cat .env | xargs)'
 | |
| 	@echo "./gradlew bootRun --args='--server.port=8081'"
 | |
| 	@cd ./front/MyINPulse-front/ && npm run dev &
 | |
| 
 | |
| test-back: clean keycloak
 | |
| 	@cp config/dev.env front/MyINPulse-front/.env
 | |
| 	@cp config/dev.env .env
 | |
| 	@cp config/dev.env MyINPulse-back/.env
 | |
| 	@cp config/dev.docker-compose.yaml docker-compose.yaml
 | |
| 	@docker compose up -d --build
 | |
| 	@echo "cd MyINPulse-back" && echo 'export $$(cat .env | xargs)'
 | |
| 	@cd ./MyINPulse-back/ && ./gradlew test && ./gradlew jacocoTestReport
 | |
| 	@firefox ./MyINPulse-back/build/jacocoHtml/index.html
 |