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; +}