Skip to content

Commit

Permalink
fix(start-stack): use TTL files from DSP-API v24.0.8 (DEV-1580) (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnussbaum committed Dec 20, 2022
1 parent 33ab59d commit 3ad96ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
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

0 comments on commit 3ad96ba

Please sign in to comment.