# makefile for sample commands
#

default: clean build

clean:
	rm -rf ./front
	rm -rf ./back

build:
	cd ../familySite1Frontend && ng build
	mkdir -p ./front/dist 
	cp -r ../familySite1Frontend/dist/familySite1 ./front/dist/
	cp ../familySite1Frontend/Dockerfile ./front/
	cd ../familySite1Backend && mvn package
	mkdir -p ./back/target
	cp -r ../familySite1Backend/target/*.jar ./back/target/
	cp ../familySite1Backend/Dockerfile ./back/
	chmod a+x ./back/target/*.jar

deploy:
	docker compose up -d --build --remove-orphans
