mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-09-14 11:06:13 +05:00
Use temp nginx logs in docs validation
This commit is contained in:
parent
c5aff50a06
commit
de4579f2af
@ -241,7 +241,10 @@ def validate_non_running(snippet: Snippet, disposition: str) -> None:
|
||||
with tempfile.TemporaryDirectory(prefix="archivebox-docs-nginx-") as temp:
|
||||
config = Path(temp) / "nginx.conf"
|
||||
config.write_text(
|
||||
f"pid {temp}/nginx.pid;\nevents {{}}\nhttp {{\nserver {{\nlisten 8080;\n{snippet.code}\n}}\n}}\n",
|
||||
f"pid {temp}/nginx.pid;\n"
|
||||
f"error_log {temp}/error.log;\n"
|
||||
f"events {{}}\n"
|
||||
f"http {{\naccess_log {temp}/access.log;\nserver {{\nlisten 8080;\n{snippet.code}\n}}\n}}\n",
|
||||
)
|
||||
result = subprocess.run(
|
||||
[nginx, "-t", "-c", config, "-p", temp],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user