Skip to content

Commit

Permalink
chore: Remove .env file requirement from setup (#3240)
Browse files Browse the repository at this point in the history
  • Loading branch information
BalduinLandolt authored May 13, 2024
1 parent fafe48a commit 171719b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 133 deletions.
34 changes: 9 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
THIS_FILE := $(abspath $(lastword $(MAKEFILE_LIST)))
CURRENT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))

include vars.mk

#################################
# Documentation targets
#################################
Expand Down Expand Up @@ -70,38 +68,24 @@ docker-publish: docker-publish-dsp-api-image docker-publish-sipi-image ## publis
docker-image-tag: ## prints the docker image tag
@$(SBTX) -Dsbt.log.noformat=true -Dsbt.supershell=false -Dsbt.ci=true -error "print dockerImageTag"

#################################
## Docker-Compose targets
#################################

.PHONY: print-env-file
print-env-file: ## prints the env file used by dsp-stack
@cat .env

.PHONY: env-file
env-file: ## write the env file used by dsp-stack.
@echo DOCKERHOST=$(DOCKERHOST) > .env
@echo KNORA_DB_REPOSITORY_NAME=$(KNORA_DB_REPOSITORY_NAME) >> .env
@echo LOCAL_HOME=$(CURRENT_DIR) >> .env

#################################
## DSP Stack Targets
#################################

.PHONY: stack-up
stack-up: docker-build env-file ## starts the dsp-stack: fuseki, sipi, api and app.
stack-up: docker-build ## starts the dsp-stack: fuseki, sipi, api and app.
@docker compose -f docker-compose.yml up -d db
$(CURRENT_DIR)/webapi/scripts/wait-for-db.sh
@docker compose -f docker-compose.yml up -d
$(CURRENT_DIR)/webapi/scripts/wait-for-api.sh

.PHONY: stack-up-fast
stack-up-fast: docker-build-dsp-api-image env-file ## starts the dsp-stack by skipping rebuilding most of the images (only api image is rebuilt).
stack-up-fast: docker-build-dsp-api-image ## starts the dsp-stack by skipping rebuilding most of the images (only api image is rebuilt).
docker-compose -f docker-compose.yml up -d

.PHONY: stack-up-ci
stack-up-ci: KNORA_DB_REPOSITORY_NAME := knora-test-unit
stack-up-ci: docker-build env-file print-env-file ## starts the dsp-stack using 'knora-test-unit' repository: fuseki, sipi, api.
stack-up-ci: KNORA_WEBAPI_TRIPLESTORE_FUSEKI_REPOSITORY_NAME := knora-test-unit
stack-up-ci: docker-build ## starts the dsp-stack using 'knora-test-unit' repository: fuseki, sipi, api.
docker-compose -f docker-compose.yml up -d

.PHONY: stack-restart
Expand Down Expand Up @@ -162,7 +146,7 @@ stack-down-delete-volumes: clean-local-tmp clean-sipi-tmp ## stops the dsp-stack
@docker compose -f docker-compose.yml down --volumes

.PHONY: stack-config
stack-config: env-file
stack-config:
@docker compose -f docker-compose.yml config

.PHONY: stack-without-api
Expand All @@ -179,7 +163,7 @@ stack-without-api-and-sipi: stack-up ## starts the dsp-stack without dsp-api and
@docker compose -f docker-compose.yml stop sipi

.PHONY: stack-db-only
stack-db-only: env-file ## starts only fuseki.
stack-db-only: ## starts only fuseki.
@docker compose -f docker-compose.yml up -d db
$(CURRENT_DIR)/webapi/scripts/wait-for-db.sh

Expand Down Expand Up @@ -217,17 +201,17 @@ integration-test: docker-build-sipi-image ## runs all integration tests
#################################

.PHONY: init-db-test
init-db-test: env-file stack-down-delete-volumes stack-db-only ## initializes the knora-test repository
init-db-test: stack-down-delete-volumes stack-db-only ## initializes the knora-test repository
@echo $@
cd $(CURRENT_DIR)/webapi/scripts && ./fuseki-init-knora-test.sh

.PHONY: init-db-test-minimal
init-db-test-minimal: env-file stack-down-delete-volumes stack-db-only ## initializes the knora-test repository with minimal data
init-db-test-minimal: stack-down-delete-volumes stack-db-only ## initializes the knora-test repository with minimal data
@echo $@
cd $(CURRENT_DIR)/webapi/scripts && ./fuseki-init-knora-test-minimal.sh

.PHONY: init-db-test-empty
init-db-test-empty: env-file stack-down-delete-volumes stack-db-only ## initializes the knora-test repository with minimal data
init-db-test-empty: stack-down-delete-volumes stack-db-only ## initializes the knora-test repository with minimal data
@echo $@
cd $(CURRENT_DIR)/webapi/scripts && ./fuseki-init-knora-test-empty.sh

Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ services:
- KNORA_WEBAPI_TRIPLESTORE_HOST=db
- KNORA_WEBAPI_TRIPLESTORE_DBTYPE=fuseki
- KNORA_WEBAPI_SIPI_INTERNAL_HOST=sipi
- KNORA_WEBAPI_TRIPLESTORE_FUSEKI_REPOSITORY_NAME=${KNORA_DB_REPOSITORY_NAME}
- KNORA_WEBAPI_TRIPLESTORE_FUSEKI_USERNAME=admin
- KNORA_WEBAPI_TRIPLESTORE_FUSEKI_PASSWORD=test
- KNORA_WEBAPI_CACHE_SERVICE_ENABLED=true
Expand Down
1 change: 0 additions & 1 deletion docs/06-sipi/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ embedded metadata, and implements the [International Image
Interoperability Framework (IIIF)](http://iiif.io/). DSP-API is designed
to use Sipi for converting and serving media files.

* [Setting Up Sipi for DSP-API](setup-sipi-for-dsp-api.md)
* [Interaction Between Sipi and DSP-API](sipi-and-dsp-api.md)
94 changes: 0 additions & 94 deletions docs/06-sipi/setup-sipi-for-dsp-api.md

This file was deleted.

1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ nav:
- Third-Party Dependencies: 05-internals/development/third-party.md
- SIPI:
- Overview: 06-sipi/index.md
- Setting Up Sipi for DSP-API: 06-sipi/setup-sipi-for-dsp-api.md
- Interaction between Sipi and DSP-API: 06-sipi/sipi-and-dsp-api.md
- Lucene:
- Lucene Query Parser Syntax: 07-lucene/lucene-query-parser-syntax.md
Expand Down
11 changes: 0 additions & 11 deletions vars.mk

This file was deleted.

0 comments on commit 171719b

Please sign in to comment.