diff --git a/Dockerfile b/Dockerfile index 86c6b68..37b295e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,8 +10,11 @@ WORKDIR /fdroid RUN fdroid init -v RUN fdroid update -# Second stage: serve the /repo directory using Filebrowser +# Second stage: serve the /repo directory using Filebrowser and NGINX FROM filebrowser/filebrowser AS final +RUN apk update && apk add nginx COPY --from=build /fdroid/ / COPY settings.json /config/settings.json -CMD ["--config", "/config/settings.json"] \ No newline at end of file +COPY nginx.conf /etc/nginx/conf.d/default.conf +EXPOSE 8084 +CMD ["--config", "/config/settings.json", "&", "nginx", "&", "wait"] \ No newline at end of file diff --git a/docker-compose-deploy.yaml b/docker-compose-deploy.yaml index 6ce764e..58d3af2 100644 --- a/docker-compose-deploy.yaml +++ b/docker-compose-deploy.yaml @@ -10,7 +10,7 @@ services: - fbdb:/database ports: - ${WEB_PORT-8083}:80 - + - ${REPO_PORT-8084}:8084 volumes: fbdb: repo: diff --git a/docker-compose.yaml b/docker-compose.yaml index c44e564..bf0f281 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -7,6 +7,7 @@ services: - TZ=Europe/Rome ports: - 8083:80 + - 8084:8084 build: context: . dockerfile: Dockerfile diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..7a4d3cc --- /dev/null +++ b/nginx.conf @@ -0,0 +1,9 @@ +server { + listen *:8084; + server_name localhost; + + location / { + root /fdroid/repo; + autoindex on; + } +}