Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(start-stack): use TTL files from DSP-API v24.0.8 (DEV-1580) #273

Merged
merged 5 commits into from Dec 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/dsp-tools-usage.md
Expand Up @@ -274,7 +274,6 @@ Here's an overview of the two ways:
| target group | researchers, RDU employees | developers of DSP-API or DSP-APP |
| how it works | run `dsp-tools start-stack` | execute commands from within locally cloned DSP-API/DSP-APP repositories |
| software dependencies | Docker, Python, dsp-tools | XCode command line tools, Docker, sbt, Java, Angular, node, yarn |
| OS | Windows, Mac OS, Linux | Mac OS, Linux |
| mechanism in the background | run pre-built Docker images | build DSP-API and DSP-APP from a branch in the repository |
| available versions | latest released version | any branch, or locally modified working tree |
| caveats | | dependencies must be kept up to date |
Expand Down
7 changes: 3 additions & 4 deletions knora/dsplib/utils/stack_handling.py
@@ -1,4 +1,3 @@
import json
import re
import subprocess
import time
Expand Down Expand Up @@ -35,8 +34,8 @@ def start_stack(
raise BaseError('The arguments "--prune" and "--no-prune" are mutually exclusive')

# get sipi.docker-config.lua
latest_release = json.loads(requests.get("https://api.github.com/repos/dasch-swiss/dsp-api/releases").text)[0]
url_prefix = f"https://github.com/dasch-swiss/dsp-api/raw/{latest_release['target_commitish']}/"
commit_of_used_api_version = "3f44354df"
url_prefix = f"https://github.com/dasch-swiss/dsp-api/raw/{commit_of_used_api_version}/"
docker_config_lua_text = requests.get(f"{url_prefix}sipi/config/sipi.docker-config.lua").text
if max_file_size:
max_post_size_regex = r"max_post_size ?= ?[\'\"]\d+M[\'\"]"
Expand Down Expand Up @@ -96,7 +95,7 @@ def start_stack(

# startup all other components
subprocess.run("docker compose up -d", shell=True, cwd=docker_path)
print("DSP-API is now running on http://localhost:3333/ and DSP-APP on http://localhost:4200/")
print("DSP-API is now running on http://0.0.0.0:3333/ and DSP-APP on http://0.0.0.0:4200/")

# docker system prune
if enforce_docker_system_prune:
Expand Down