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 /
|
COPY ./watcher.py /
|
||||||
USER root
|
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
|
# wheel builder
|
||||||
# docker buildx build . --target wheel \
|
# docker buildx build . --target wheel \
|
||||||
|
|
|
@ -40,6 +40,7 @@ For the bleeding edge, download artifacts of
|
||||||
## Dev
|
## Dev
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
git clone https://git.sr.ht/~nicoco/slidge
|
||||||
git clone https://git.sr.ht/~nicoco/slidge-whatsapp
|
git clone https://git.sr.ht/~nicoco/slidge-whatsapp
|
||||||
cd slidge-whatsapp
|
cd slidge-whatsapp
|
||||||
docker-compose up
|
docker-compose up
|
||||||
|
|
|
@ -11,6 +11,7 @@ services:
|
||||||
- --debug
|
- --debug
|
||||||
network_mode: service:prosody
|
network_mode: service:prosody
|
||||||
volumes:
|
volumes:
|
||||||
|
- ../slidge/slidge:/venv/lib/python/site-packages/slidge
|
||||||
- ./slidge_whatsapp:/venv/lib/python/site-packages/slidge_whatsapp
|
- ./slidge_whatsapp:/venv/lib/python/site-packages/slidge_whatsapp
|
||||||
- ./persistent:/var/lib/slidge
|
- ./persistent:/var/lib/slidge
|
||||||
depends_on:
|
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 "."
|
path = sys.argv[1] if len(sys.argv) > 1 else "."
|
||||||
observer.schedule(auto_restart, path, recursive=True)
|
for p in path.split(":"):
|
||||||
observer.schedule(gopy_build, path, recursive=True)
|
observer.schedule(auto_restart, p, recursive=True)
|
||||||
|
observer.schedule(gopy_build, p, recursive=True)
|
||||||
observer.start()
|
observer.start()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
for dirpath, _, filenames in os.walk(path):
|
for p in path.split(":"):
|
||||||
if "go.mod" in filenames:
|
for dirpath, _, filenames in os.walk(p):
|
||||||
subprocess.run(gopy_cmd, shell=True, cwd=dirpath)
|
if "go.mod" in filenames:
|
||||||
|
subprocess.run(gopy_cmd, shell=True, cwd=dirpath)
|
||||||
auto_restart.start()
|
auto_restart.start()
|
||||||
while observer.is_alive():
|
while observer.is_alive():
|
||||||
observer.join(1)
|
observer.join(1)
|
||||||
|
|
Loading…
Reference in New Issue