-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
29 lines (26 loc) · 1015 Bytes
/
Makefile
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
.PHONY: all build run logs generate migrate seed stop migrate/rollback migrate/refresh tidy
# Variables
DOCKER_COMPOSE_FILE=docker-compose.yaml
all: build
build:
docker-compose -f $(DOCKER_COMPOSE_FILE) build --no-cache
build/cache:
docker-compose -f $(DOCKER_COMPOSE_FILE) build
run:
docker-compose -f $(DOCKER_COMPOSE_FILE) up -d
stop:
docker-compose -f $(DOCKER_COMPOSE_FILE) down
logs:
docker-compose -f $(DOCKER_COMPOSE_FILE) logs -f
generate:
go generate ./src/...
migrate:
docker-compose -f $(DOCKER_COMPOSE_FILE) run --rm graphql go run src/cmd/migrate/main.go --action=migrate
migrate/rollback:
docker-compose -f $(DOCKER_COMPOSE_FILE) run --rm graphql go run src/cmd/migrate/main.go --action=rollback
migrate/refresh:
docker-compose -f $(DOCKER_COMPOSE_FILE) run --rm graphql go run src/cmd/migrate/main.go --action=refresh
seed:
docker-compose -f $(DOCKER_COMPOSE_FILE) run --rm graphql go run src/cmd/seed/main.go
tidy:
docker-compose -f $(DOCKER_COMPOSE_FILE) run --rm graphql go mod tidy