48 lines
849 B
Makefile
48 lines
849 B
Makefile
# Harbor Desk deploy helpers
|
||
# 用法:make -C deploy redeploy
|
||
|
||
.PHONY: env redeploy redeploy-keep wipe infra migrate build start stop status nginx help
|
||
|
||
SCRIPTS := ./scripts
|
||
|
||
help:
|
||
@echo "make env | redeploy | redeploy-keep | wipe | infra | migrate | build | start | stop | status | nginx"
|
||
|
||
env:
|
||
@if [ ! -f .env.dev ]; then \
|
||
cp .env.example .env.dev; \
|
||
echo "created deploy/.env.dev — 請改密鑰"; \
|
||
else \
|
||
echo "deploy/.env.dev already exists"; \
|
||
fi
|
||
|
||
redeploy:
|
||
$(SCRIPTS)/redeploy.sh --yes --kill-orphan
|
||
|
||
redeploy-keep:
|
||
$(SCRIPTS)/redeploy.sh --yes --keep-data
|
||
|
||
wipe:
|
||
$(SCRIPTS)/wipe.sh --yes --kill-orphan
|
||
|
||
infra:
|
||
$(SCRIPTS)/up-infra.sh
|
||
|
||
migrate:
|
||
$(SCRIPTS)/migrate.sh
|
||
|
||
build:
|
||
$(SCRIPTS)/build.sh
|
||
|
||
start:
|
||
$(SCRIPTS)/start.sh
|
||
|
||
stop:
|
||
$(SCRIPTS)/stop.sh
|
||
|
||
status:
|
||
$(SCRIPTS)/status.sh
|
||
|
||
nginx:
|
||
$(SCRIPTS)/install-nginx.sh
|