Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/guides/add-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -854,11 +854,15 @@ Singularity/Apptainer が計算ノードで使える場合は、共有ファイ
```bash
BASE=/uhome/<user>/gitlab-runner_jacamar-ci_amd
SING=/path/to/singularity
ALPINE_GIT_IMAGE=docker://alpine/git:<pinned-tag>

mkdir -p "$BASE/containers" "$BASE/bin"
"$SING" build --sandbox "$BASE/containers/git" docker://alpine/git:latest
"$SING" build --sandbox "$BASE/containers/git" "$ALPINE_GIT_IMAGE"
```

`<pinned-tag>` は site 側で動作確認した固定 tag に置き換えてください。
`latest` は使わないでください。

`$BASE/bin/git`:

```bash
Expand Down
4 changes: 4 additions & 0 deletions result_server/app_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ def payload_too_large(_error):
app.config["RECEIVED_PADATA_DIR"] = received_padata_dir
app.config["RECEIVED_ESTIMATION_ARTIFACTS_DIR"] = received_estimation_artifacts_dir
app.config["ESTIMATED_DIR"] = estimated_dir
app.config["EXECUTION_PROFILE_DB_PATH"] = os.environ.get(
"RESULT_SERVER_DB_PATH",
os.path.join(base_dir, "cx_portal.sqlite3"),
)

# Home routes and loaders pull everything from current_app.config.
register_home_routes(app)
Expand Down
9 changes: 9 additions & 0 deletions result_server/tests/test_app_dev_security.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,12 @@ def test_validate_dev_runtime_rejects_production_env(monkeypatch):
monkeypatch.setenv("FLASK_ENV", "production")
with pytest.raises(SystemExit):
app_dev.validate_dev_runtime("127.0.0.1")


def test_create_dev_app_configures_execution_profile_db(tmp_path, monkeypatch):
monkeypatch.delenv("RESULT_SERVER_DB_PATH", raising=False)
app_dev.setup_dev_environment(str(tmp_path))

app = app_dev.create_dev_app(str(tmp_path))

assert app.config["EXECUTION_PROFILE_DB_PATH"] == str(tmp_path / "cx_portal.sqlite3")
Loading