58 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
		
			1.7 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
 | |
| 
 | |
| 
 | |
| dev-front: clean vite
 | |
| 	@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
 | |
| 
 | |
| prod: clean
 | |
| 	@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:
 | |
| 	@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
 | |
| 	@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 &
 |