From 22da4e153ea6a5f589ac288913c8d96567b9ab03 Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Mon, 7 Mar 2022 16:57:07 +0100 Subject: [PATCH] webdav --- webdav/Dockerfile | 6 ++++++ webdav/Makefile | 22 ++++++++++++++++++++++ webdav/nginx.conf | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 webdav/Dockerfile create mode 100644 webdav/Makefile create mode 100644 webdav/nginx.conf diff --git a/webdav/Dockerfile b/webdav/Dockerfile new file mode 100644 index 0000000..cfb72a7 --- /dev/null +++ b/webdav/Dockerfile @@ -0,0 +1,6 @@ +FROM alpine:3.15 + +RUN apk add --no-cache nginx nginx-mod-http-dav-ext +COPY nginx.conf /etc/nginx/nginx.conf + +CMD ["nginx", "-g", "daemon off;"] diff --git a/webdav/Makefile b/webdav/Makefile new file mode 100644 index 0000000..0cc3209 --- /dev/null +++ b/webdav/Makefile @@ -0,0 +1,22 @@ +IMG_NAME = webdav +REGISTRY=registry.monotremata.xyz +IMG=$(REGISTRY)/$(IMG_NAME) +PLATFORMS=linux/amd64,linux/arm64 + +.PHONY: build build-nc push + +build: Dockerfile + docker build -t $(IMG) . + +buildx: Dockerfile + docker buildx build \ + --platform $(PLATFORMS) \ + --tag $(IMG) \ + --push \ + . + +push: build + docker image push $(IMG) + +build-nc: Dockerfile + docker build --no-cache -t $(IMG) . diff --git a/webdav/nginx.conf b/webdav/nginx.conf new file mode 100644 index 0000000..45dbceb --- /dev/null +++ b/webdav/nginx.conf @@ -0,0 +1,32 @@ +user nginx; +worker_processes auto; + +error_log /var/log/nginx/error.log notice; +pid /var/run/nginx.pid; + +include /etc/nginx/modules/*.conf; + +events { + worker_connections 1024; +} + + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + include /etc/nginx/conf.d/*.conf; +}