From b26893d8b36b49f469dde748b77394b7e9729d21 Mon Sep 17 00:00:00 2001 From: Daniele Viti Date: Tue, 12 Sep 2023 17:57:30 +0200 Subject: [PATCH] Added nginx to serve /repo folder --- Dockerfile | 7 +++++-- nginx.conf | 18 ++++++++++++------ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 37b295e..f02ed35 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,9 @@ FROM filebrowser/filebrowser AS final RUN apk update && apk add nginx COPY --from=build /fdroid/ / COPY settings.json /config/settings.json -COPY nginx.conf /etc/nginx/conf.d/default.conf +RUN rm /etc/nginx/nginx.conf +COPY nginx.conf /etc/nginx/nginx.conf EXPOSE 8084 -CMD ["--config", "/config/settings.json", "&", "nginx", "&", "wait"] \ No newline at end of file +ENTRYPOINT [] +#CMD ["sh", "-c", "while true; do sleep 1; done"] +CMD ["sh", "-c", "nginx && /filebrowser --config /config/settings.json"] \ No newline at end of file diff --git a/nginx.conf b/nginx.conf index 7a4d3cc..b80720f 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,9 +1,15 @@ -server { - listen *:8084; - server_name localhost; +events { + worker_connections 1024; +} - location / { - root /fdroid/repo; - autoindex on; +http { + server { + listen 8084; + server_name localhost; + + location / { + root /fdroid/repo; + autoindex on; + } } }