Files
ssh-manager/Makefile
2026-04-16 23:28:26 +08:00

35 lines
772 B
Makefile

.PHONY: help build up down restart logs ps
COMPOSE_FILE := docker/docker-compose.yml
COMPOSE := docker compose -f $(COMPOSE_FILE)
help:
@printf "Available targets:\n"
@printf " make build Build Docker images\n"
@printf " make up Build and start services in background\n"
@printf " make down Stop and remove services\n"
@printf " make restart Restart services\n"
@printf " make logs Follow service logs\n"
@printf " make ps Show service status\n"
@printf " Note: do not use 'docker compose down -v' in daily usage (it removes persistent volumes)\n"
build:
$(COMPOSE) build
up:
$(COMPOSE) build
$(COMPOSE) up -d
down:
$(COMPOSE) down
restart:
$(COMPOSE) down
$(COMPOSE) up -d
logs:
$(COMPOSE) logs -f
ps:
$(COMPOSE) ps