-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
37 lines (27 loc) · 874 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
30
31
32
33
34
35
36
37
COMPOSE=$(shell which docker-compose || echo "docker compose")
SERVER_IMAGE=nebulabroadcast/nebula-server:latest
WORKER_IMAGE=nebulabroadcast/nebula-worker:latest
SERVER_CONTAINER=backend
WORKER_CONTAINER=worker
.PHONY: dbshell setup reload
#
# Runtime
#
dbshell:
@$(COMPOSE) exec postgres psql -U nebula nebula
setup:
@$(COMPOSE) exec $(SERVER_CONTAINER) python -m setup
@$(COMPOSE) exec $(SERVER_CONTAINER) ./manage reload
reload:
@$(COMPOSE) exec $(SERVER_CONTAINER) ./manage reload
restart:
@$(COMPOSE) restart $(SERVER_CONTAINER) $(WORKER_CONTAINER)
update:
docker pull $(SERVER_IMAGE)
docker pull $(WORKER_IMAGE)
$(COMPOSE) up --detach --build $(SERVER_CONTAINER)
$(COMPOSE) up --detach --build $(WORKER_CONTAINER)
user:
@$(COMPOSE) exec $(SERVER_CONTAINER) python -m cli user
password:
@$(COMPOSE) exec $(SERVER_CONTAINER) python -m cli password