-
Notifications
You must be signed in to change notification settings - Fork 23
/
Makefile
54 lines (37 loc) · 1.48 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
.PHONY: start stop build pull shell down remove remove-images logs logs-less exec user sysadmin secret cron clean-rebuild
COMPOSE_FILES = -f docker-compose.yaml -f .docker-compose-db.yaml -f .docker-compose.$O-theme.yaml
start:
docker-compose $(COMPOSE_FILES) up -d --build nginx && make cron
stop:
docker-compose $(COMPOSE_FILES) stop
build:
docker-compose $(COMPOSE_FILES) build
pull:
docker-compose $(COMPOSE_FILES) pull
shell:
docker-compose $(COMPOSE_FILES) exec $S $C
down:
docker-compose $(COMPOSE_FILES) down
remove:
docker-compose $(COMPOSE_FILES) down -v
remove-images:
docker images -a | grep "ckan-cloud-docker" | awk '{print $$3}' | xargs docker rmi -f
logs:
docker-compose $(COMPOSE_FILES) logs -f $S
logs-less:
docker-compose $(COMPOSE_FILES) logs $S | less
exec:
docker-compose $(COMPOSE_FILES) exec $S $C
user:
docker-compose $(COMPOSE_FILES) exec ckan /usr/local/bin/ckan-paster --plugin=ckan user add $U password=$P email=$E -c /etc/ckan/production.ini
sysadmin:
docker-compose $(COMPOSE_FILES) exec ckan /usr/local/bin/ckan-paster --plugin=ckan sysadmin add $U -c /etc/ckan/production.ini
secret:
python create_secrets.py
cron:
docker-compose $(COMPOSE_FILES) exec --user=root ckan service cron start
clean-rebuild:
docker-compose $(COMPOSE_FILES) down -v
docker images -a | grep "ckan-cloud-docker" | awk '{print $$3}' | xargs docker rmi -f
docker-compose $(COMPOSE_FILES) build --no-cache
docker-compose $(COMPOSE_FILES) up -d --build nginx && make cron