use user uid 1000

This commit is contained in:
Akbar Rahman 2023-12-27 23:59:40 +00:00
parent 109e06a5d6
commit 9c248a194d
Signed by: alvierahman90
GPG Key ID: 6217899F07CA2BDF
2 changed files with 11 additions and 3 deletions

View File

@ -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" ]

View File

@ -10,7 +10,7 @@
<img id="img" src="" />
<p id="statusline">submit an image to get started!</p>
<form id="form" action="http://localhost:8759/submit" method="post">
<form id="form" action="https://glass.alv.cx/submit" method="post">
<input type="file" id="job" name="image" accept="image/png,image/jpeg" /><br>
<button type="submit" id="submit">submit</button>
</form>
@ -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;
}
}