Skip to content

Commit f0e8b64

Browse files
committed
feat: hardening, support for towards rhel + selinux (not finished), patching for volumes
1 parent 9c8c5a0 commit f0e8b64

File tree

6 files changed

+734
-679
lines changed

6 files changed

+734
-679
lines changed

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,13 @@ clean-tests:
1616

1717
tests:
1818
source .venv/bin/activate && pytest -m e2e
19+
20+
patch_templates:
21+
@VENV=$$(mktemp -d) && \
22+
uv venv $$VENV && \
23+
source $$VENV/bin/activate && \
24+
uv pip install ruamel.yaml && \
25+
python scripts/selinuxify_template_patch.py && \
26+
rm -rf $$VENV
27+
28+
.PHONY: patch_templates tests clean-tests build_appwrite_cli build_appwrite_playwright

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ pip install appwrite-lab
1010
## Appwrite Lab features (in progress)
1111
- [x] Spin up ephemeral Appwrite instances with Docker/Podman
1212
- [x] Automatically grab API keys (for programmatic access)
13-
- [ ] Test suite
1413
- [x] Environment syncing
15-
- [ ] Appwrite data population
1614
- [x] Clean teardowns
1715

16+
## Appwrite Lab in progress features
17+
- [ ] Test suite
18+
- [ ] Appwrite data population
1819

1920
## CLI Usage
2021
### Help with appwrite-lab CLI
@@ -44,3 +45,9 @@ or sync a specific resource:
4445
```sh
4546
appwrite-lab sync test-lab --resource functions
4647
```
48+
49+
## Known Troubleshooting
50+
### Podman support and Selinux
51+
Since I am mimicking the `compose` file that Appwrite provides, it was not designed to work rootless, but I have adjusted to work also on Fedora. You will need to turn `selinux` off for now to use.
52+
53+

appwrite_lab/_orchestrator.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ def __post_init__(self):
3434
)
3535

3636

37-
@dataclass
38-
class CompletedProcess: ...
39-
40-
4137
class OrchestratorError(Exception): ...
4238

4339

@@ -313,17 +309,16 @@ def deploy_playwright_automation(
313309
with tempfile.TemporaryDirectory() as temp_dir:
314310
shutil.copytree(automation_dir, temp_dir, dirs_exist_ok=True)
315311
function = Path(temp_dir) / "automations" / "scripts" / f"{automation}.py"
316-
317312
cmd = [
318313
self.util,
319314
"run",
320315
"--network",
321316
"host",
322-
# "--rm",
317+
"--rm",
323318
"-u",
324319
f"{os.getuid()}:{os.getgid()}",
325320
"-v",
326-
f"{temp_dir}:{container_work_dir}",
321+
f"{temp_dir}:{container_work_dir}:Z",
327322
*args,
328323
*docker_env_args,
329324
APPWRITE_PLAYWRIGHT_IMAGE,

0 commit comments

Comments
 (0)