-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
72 lines (52 loc) · 1.69 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
.DEFAULT_GOAL := help
.PHONY: docker-build docker-up build start log stop restart
DOCKER_COMPOSE_DEV=docker compose -f docker-compose-dev.yml --env-file .env --env-file .env.local
DOCKER_COMPOSE_ZROK=docker compose -f docker-compose-zrok.yml --env-file .env.zrok --env-file .env.zrok.local
DOCKER_COMPOSE_PROD=docker compose -f docker-compose-prod.yml --env-file .env.production --env-file .env.production.local
# Dev commands
start:
$(DOCKER_COMPOSE_DEV) up -d
stop:
$(DOCKER_COMPOSE_DEV) kill
$(DOCKER_COMPOSE_DEV) rm -fv
config:
$(DOCKER_COMPOSE_DEV) config
upgrade:
$(DOCKER_COMPOSE_DEV) pull
$(DOCKER_COMPOSE_DEV) up -d
logs-activitypods:
$(DOCKER_COMPOSE_DEV) logs activitypods-backend
attach-activitypods:
$(DOCKER_COMPOSE_DEV) exec activitypods-backend pm2 attach 0
# Prod commands
build-prod:
$(DOCKER_COMPOSE_PROD) build
start-prod:
$(DOCKER_COMPOSE_PROD) up -d
stop-prod:
$(DOCKER_COMPOSE_PROD) kill
$(DOCKER_COMPOSE_PROD) rm -fv
config-prod:
$(DOCKER_COMPOSE_PROD) config
upgrade-prod:
$(DOCKER_COMPOSE_PROD) pull
$(DOCKER_COMPOSE_PROD) up -d
attach-backend-prod:
$(DOCKER_COMPOSE_PROD) exec backend pm2 attach 0
# Publish commands
publish-frontend:
export TAG=`git describe --tags --abbrev=0`
$(DOCKER_COMPOSE_PROD) build app-frontend
$(DOCKER_COMPOSE_PROD) push app-frontend
publish-backend:
export TAG=`git describe --tags --abbrev=0`
$(DOCKER_COMPOSE_PROD) build app-backend
$(DOCKER_COMPOSE_PROD) push app-backend
publish-frontend-latest:
export TAG=latest
$(DOCKER_COMPOSE_PROD) build app-frontend
$(DOCKER_COMPOSE_PROD) push app-frontend
publish-backend-latest:
export TAG=latest
$(DOCKER_COMPOSE_PROD) build app-backend
$(DOCKER_COMPOSE_PROD) push app-backend