浏览代码

remove make scripts for server

mightyplow 5 年之前
父节点
当前提交
691d73688c
共有 1 个文件被更改,包括 6 次插入14 次删除
  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
-
-