Parcourir la source

remove make scripts for server

mightyplow il y a 5 ans
Parent
commit
691d73688c
1 fichiers modifiés avec 6 ajouts et 14 suppressions
  1. 6 14
      Makefile

+ 6 - 14
Makefile

@@ -1,5 +1,4 @@
 clientPath = './'
-serverPath = './server/'
 targetPath = '/srv/www/simple-calorie-tracker'
 
 host = 'mightyserver'
@@ -8,34 +7,27 @@ all: build
 
 setup:
 	npm i --prefix ${clientPath}
-	npm i --prefix ${serverPath}
 
 build:
 	npm run build --prefix ${clientPath}
 
 ensure-target-directories:
-	ssh ${host} mkdir -p ${targetPath}/
+	ssh ${host} mkdir -p ${targetPath}
+
+deploy-web: ensure-target-directories
+	rsync -vzruc --delete-before -e ssh ./dist ${host}:${targetPath}/
 
 deploy-server: ensure-target-directories
-	rsync -vzruc --delete-before -e ssh ./{dist,nginx} ${host}:${targetPath}/
+	rsync -vzruc --delete-before -e ssh ./{nginx, docker-compose.yml} ${host}:${targetPath}/
 	ssh ${host} mkdir -p ${targetPath}/log
 
 build-and-deploy: build deploy-server
 
-prepare-docker-compose:
-	rsync -vzruc --delete-before -e ssh ./docker-compose.yml ${host}:${targetPath}/
-
 stop-server:
 	ssh ${host} docker-compose -f ${targetPath}/docker-compose.yml down
 
-start-server: prepare-docker-compose
+start-server: deploy-server
 	ssh ${host} docker-compose -f ${targetPath}/docker-compose.yml up -d --build
 
-restart-server: stop-server deploy-server start-server
-
 stop-and-clean:
 	ssh ${host} docker-compose -f ${targetPath}/docker-compose.yml down --rmi local --remove-orphans -v
-
-redeploy: stop-and-clean deploy-server start-server
-
-