-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (39 loc) · 1.3 KB
/
Makefile
File metadata and controls
50 lines (39 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
DEFAULT_GOAL := help
ifeq ($(OS),Windows_NT)
SHELL := powershell.exe
.SHELLFLAGS := -NoProfile -ExecutionPolicy Bypass -Command
SETUP_COMMAND := .\setup.ps1
COMPOSE_LOCAL := docker compose --profile local-docker
COMPOSE_BUILD := docker compose --profile local-docker --profile build
else
SHELL := /bin/bash
SETUP_COMMAND := bash ./setup.sh
COMPOSE_LOCAL := env -u DOCKER_HOST docker compose --profile local-docker
COMPOSE_BUILD := env -u DOCKER_HOST docker compose --profile local-docker --profile build
endif
.PHONY: help setup build up down restart logs ps update
help:
@echo "Available targets:"
@echo " setup Create or sync .env and generate API_KEYS if needed"
@echo " build Build the local development images"
@echo " up Start the local development stack"
@echo " down Stop containers but keep data volumes"
@echo " restart Restart all services"
@echo " logs Follow logs for all services"
@echo " ps Show container status"
@echo " update Pull latest changes from git"
setup:
@$(SETUP_COMMAND)
build: setup
$(COMPOSE_BUILD) build
up: build
$(COMPOSE_LOCAL) up -d
down:
-$(COMPOSE_LOCAL) down --remove-orphans
restart: down up
logs:
$(COMPOSE_LOCAL) logs -f
ps:
$(COMPOSE_LOCAL) ps
update:
git pull --rebase --autostash