-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (35 loc) · 1.08 KB
/
Makefile
File metadata and controls
47 lines (35 loc) · 1.08 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
# WikiBase — Makefile
# Requires: docker-compose (v1) or Docker Compose plugin
DC = docker-compose
.PHONY: help build up down restart logs shell migrate demo createsuperuser
help:
@echo "WikiBase commands:"
@echo " make build — Build Docker images"
@echo " make up — Start all services"
@echo " make down — Stop all services"
@echo " make restart — Restart web service"
@echo " make logs — Follow logs"
@echo " make shell — Django shell"
@echo " make migrate — Run migrations"
@echo " make demo — Load demo data"
@echo " make createsuperuser— Create admin user interactively"
build:
$(DC) build
up:
$(DC) up -d
@echo "Site: http://localhost"
@echo "Admin: http://localhost/admin/"
down:
$(DC) down
restart:
$(DC) restart web
logs:
$(DC) logs -f web
shell:
$(DC) exec web python manage.py shell
migrate:
$(DC) exec web python manage.py migrate --noinput
demo:
$(DC) exec web python manage.py load_demo
createsuperuser:
$(DC) exec web python manage.py createsuperuser