-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d7f78ff
commit 6249e05
Showing
14 changed files
with
661 additions
and
304 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,60 @@ | ||
show-current-target = @echo; echo "======= $@ ========" | ||
|
||
.PHONY: all | ||
all: | ||
|
||
compose = docker compose $(COMPOSE_ARGS) | ||
compose-run = $(compose) run --rm | ||
compose-exec = $(compose) exec -T | ||
compose-cp = docker compose cp | ||
wiki-exec = $(compose-exec) wiki | ||
|
||
# ======== Build ======== | ||
|
||
.PHONY: build | ||
build: | ||
docker build \ | ||
--tag ghcr.io/gesinn-it-pub/openresearch-stack:dev \ | ||
./context | ||
|
||
.PHONY: sqlite-up | ||
sqlite-up: | ||
docker-compose up -d | ||
# ======== Run ======== | ||
|
||
.PHONY: up | ||
up: | ||
$(show-current-target) | ||
$(compose) up -d | ||
|
||
.PHONY: mysql-up | ||
mysql-up: | ||
MYSQL_HOST=mysql docker-compose --profile mysql up -d | ||
.PHONY: wait-for-wiki | ||
wait-for-wiki: | ||
$(show-current-target) | ||
$(compose-run) wait-for-wiki | ||
|
||
.PHONY: show-status | ||
show-status: | ||
docker-compose ps | ||
$(show-current-target) | ||
$(compose) ps | ||
|
||
.PHONY: show-logs | ||
show-logs: | ||
docker-compose logs -f || exit 0 | ||
docker compose logs -f || exit 0 | ||
|
||
.PHONY: stop | ||
stop: | ||
docker-compose stop | ||
$(show-current-target) | ||
$(compose) stop | ||
|
||
.PHONY: down | ||
down: | ||
docker-compose down --volumes --remove-orphans | ||
|
||
.PHONY: backstop-test | ||
backstop-test: | ||
docker-compose run --rm backstop test | ||
$(show-current-target) | ||
$(compose) down | ||
|
||
.PHONY: clean | ||
clean: down | ||
rm -rf data | ||
.PHONY: destroy | ||
destroy: | ||
$(show-current-target) | ||
$(compose) down --volumes --remove-orphans | ||
|
||
# ======== Develop ======== | ||
.PHONY: bash | ||
bash: | ||
$(show-current-target) | ||
$(compose) exec wiki bash |
Oops, something went wrong.