diff --git a/Dockerfile b/Dockerfile index bb3b8bb..d69ca13 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,4 +13,12 @@ RUN apt update && apt install -y ffmpeg libsm6 libxext6 COPY src . COPY best.pt /best.pt +RUN chown -R 1000 /usr/src/app +RUN mkdir /.config +RUN mkdir /.cache +RUN chown -R 1000 /.config +RUN chown -R 1000 /.cache + +USER 1000 + CMD [ "gunicorn", "-b 0.0.0.0:80", "--workers", "1", "app:app" ] diff --git a/index.html b/index.html index 8a7854e..fdc4d3a 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@
submit an image to get started!
- @@ -38,11 +38,11 @@ console.log(id); while (true) { - const resp = await fetch('http://localhost:8759/state/' + id); + const resp = await fetch('https://glass.alv.cx/state/' + id); const state = (await resp.json()).state; statusline.innerHTML = state; if (state == "READY") { - img.src = 'http://localhost:8759/result/' + id + img.src = 'https://glass.alv.cx/result/' + id return; } }