Use local Slidge Core mount for development
Core changes are reflected in our development containers via a locally-cloned `slidge` repository, adjacent to this repository.
This commit is contained in:
parent
1f50157537
commit
868dd3f6ae
|
@ -34,7 +34,7 @@ ENV SLIDGE_LEGACY_MODULE=slidge_whatsapp
|
|||
COPY ./watcher.py /
|
||||
USER root
|
||||
|
||||
ENTRYPOINT ["python", "/watcher.py", "/venv/lib/python/site-packages/slidge_whatsapp"]
|
||||
ENTRYPOINT ["python", "/watcher.py", "/venv/lib/python/site-packages/slidge:/venv/lib/python/site-packages/slidge_whatsapp"]
|
||||
|
||||
# wheel builder
|
||||
# docker buildx build . --target wheel \
|
||||
|
|
|
@ -40,6 +40,7 @@ For the bleeding edge, download artifacts of
|
|||
## Dev
|
||||
|
||||
```sh
|
||||
git clone https://git.sr.ht/~nicoco/slidge
|
||||
git clone https://git.sr.ht/~nicoco/slidge-whatsapp
|
||||
cd slidge-whatsapp
|
||||
docker-compose up
|
||||
|
|
|
@ -11,6 +11,7 @@ services:
|
|||
- --debug
|
||||
network_mode: service:prosody
|
||||
volumes:
|
||||
- ../slidge/slidge:/venv/lib/python/site-packages/slidge
|
||||
- ./slidge_whatsapp:/venv/lib/python/site-packages/slidge_whatsapp
|
||||
- ./persistent:/var/lib/slidge
|
||||
depends_on:
|
||||
|
|
12
watcher.py
12
watcher.py
|
@ -27,14 +27,16 @@ if __name__ == "__main__":
|
|||
)
|
||||
|
||||
path = sys.argv[1] if len(sys.argv) > 1 else "."
|
||||
observer.schedule(auto_restart, path, recursive=True)
|
||||
observer.schedule(gopy_build, path, recursive=True)
|
||||
for p in path.split(":"):
|
||||
observer.schedule(auto_restart, p, recursive=True)
|
||||
observer.schedule(gopy_build, p, recursive=True)
|
||||
observer.start()
|
||||
|
||||
try:
|
||||
for dirpath, _, filenames in os.walk(path):
|
||||
if "go.mod" in filenames:
|
||||
subprocess.run(gopy_cmd, shell=True, cwd=dirpath)
|
||||
for p in path.split(":"):
|
||||
for dirpath, _, filenames in os.walk(p):
|
||||
if "go.mod" in filenames:
|
||||
subprocess.run(gopy_cmd, shell=True, cwd=dirpath)
|
||||
auto_restart.start()
|
||||
while observer.is_alive():
|
||||
observer.join(1)
|
||||
|
|
Loading…
Reference in New Issue