File tree 12 files changed +72
-27
lines changed
12 files changed +72
-27
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,15 @@ name: build-dev
2
2
3
3
on :
4
4
push :
5
- branches :
6
- - ' ** '
5
+ branches-ignore :
6
+ - ' main '
7
7
tags-ignore :
8
8
- ' **'
9
+ paths :
10
+ - ' .github/workflows/build-dev.yml'
11
+ - ' overlay/**'
12
+ - ' Dockerfile'
13
+ - ' VERSION'
9
14
10
15
jobs :
11
16
main :
14
19
-
15
20
name : Checkout code
16
21
uses : actions/checkout@v2
22
+ -
23
+ name : Read image version
24
+ uses : bencgreen/read-file-action@v1
25
+ with :
26
+ path : ./VERSION
27
+ id : version
17
28
-
18
29
name : Set up QEMU
19
30
uses : docker/setup-qemu-action@v1
35
46
platforms : linux/amd64,linux/arm/v7,linux/arm64
36
47
tags : |
37
48
bcgdesign/nginx-webdav:dev
49
+ bcgdesign/nginx-webdav:${{ steps.version.outputs.content }}
38
50
-
39
51
name : Image digest
40
52
run : echo ${{ steps.docker_build.outputs.digest }}
Original file line number Diff line number Diff line change 9
9
paths :
10
10
- ' .github/workflows/build-main.yml'
11
11
- ' overlay/**'
12
+ - ' Dockerfile'
12
13
- ' VERSION'
13
14
14
15
jobs :
Original file line number Diff line number Diff line change 1
- FROM bcgdesign/nginx:alpine-3.13-1.4.2
1
+ FROM bcgdesign/nginx:alpine-3.13-2.0.0
2
2
3
3
LABEL maintainer=
"Ben Green <[email protected] >" \
4
4
org.label-schema.name="Nginx WebDAV" \
5
5
org.label-schema.version="latest" \
6
6
org.label-schema.vendor="Ben Green" \
7
7
org.label-schema.schema-version="1.0"
8
8
9
- ARG NGINX_VERSION
10
-
11
9
ENV \
12
10
# set to "r" or "rw" to enable read-only / read-write access
13
- DAV_ACCESS ="r" \
11
+ WEBDAV_ACCESS ="r" \
14
12
# set to "PUT DELETE MKCOL COPY MOVE" (or any variation) to enable full write access
15
- DAV_METHODS="off"
16
-
17
- ARG NGINX_VERSION=1.18.0-r13
18
- RUN apk -U upgrade \
19
- && apk add \
20
- nginx-mod-http-dav-ext=${NGINX_VERSION} \
21
- && rm -rf /var/cache/apk/* /www/* /tmp/*
13
+ WEBDAV_METHODS="off"
22
14
23
15
COPY ./overlay /
16
+ COPY ./NGINX_BUILD /tmp/VERSION
17
+
18
+ RUN bcg-install
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ ARG NGINX_VERSION
10
10
11
11
ENV \
12
12
# set to "r" or "rw" to enable read-only / read-write access
13
- DAV_ACCESS ="r" \
13
+ WEBDAV_ACCESS ="r" \
14
14
# set to "PUT DELETE MKCOL COPY MOVE" (or any variation) to enable full write access
15
- DAV_METHODS ="off"
15
+ WEBDAV_METHODS ="off"
16
16
17
17
ARG NGINX_VERSION=1.18.0-r13
18
18
RUN apk -U upgrade \
Original file line number Diff line number Diff line change
1
+ 1.18.0-r13
Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ By default files are served read-only - change two environment variables to enab
20
20
21
21
## Environment Variables
22
22
23
- | Variable | Values | Description | Default |
24
- | ------------- | ----------- | ---------------------------------------------------------- | ------- |
25
- | ` DAV_ACCESS ` | 'r' or 'rw' | Set to 'r' for read-only or 'rw' for read/write access. | r |
26
- | ` DAV_METHODS ` | string | For full write access set to 'PUT DELETE MKCOL COPY MOVE'. | off |
23
+ | Variable | Values | Description | Default |
24
+ | ---------------- | ----------- | ---------------------------------------------------------- | ------- |
25
+ | ` WEBDAV_ACCESS ` | 'r' or 'rw' | Set to 'r' for read-only or 'rw' for read/write access. | r |
26
+ | ` WEBDAV_METHODS ` | string | For full write access set to 'PUT DELETE MKCOL COPY MOVE'. | off |
27
27
28
28
## Authors
29
29
Original file line number Diff line number Diff line change 1
- 1.4.1
1
+ 2.0.0
Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ server {
2
2
listen 80;
3
3
listen [::]:80;
4
4
5
- root /www ;
5
+ root <%= ${NGINX_WWW} %> ;
6
6
7
7
autoindex on;
8
8
9
- dav_access all:<%= "${DAV_ACCESS }" %>;
10
- dav_methods <%= "${DAV_METHODS }" %>;
11
- dav_ext_methods PROPFIND OPTIONS ;
9
+ dav_access all:<%= "${WEBDAV_ACCESS }" %>;
10
+ dav_methods <%= "${WEBDAV_METHODS }" %>;
11
+ dav_ext_methods <%= "${WEBDAV_EXT_METHODS}" %> ;
12
12
13
13
client_body_temp_path /tmp;
14
14
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/with-contenv sh
2
+
3
+ set -euo pipefail
4
+ export BCG_E=`basename ${0}`
5
+
6
+
7
+ #======================================================================================================================
8
+ # Add environment variables.
9
+ #======================================================================================================================
10
+
11
+ bcg-env "WEBDAV_EXT_METHODS" "PROPFIND OPTIONS"
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/with-contenv sh
2
2
3
3
set -euo pipefail
4
+ export BCG_E=`basename ${0}`
4
5
5
6
6
7
#======================================================================================================================
7
- # Config is re-written every time in case environment variables have been changed
8
+ # Config is re-written every time in case environment variables have been changed.
8
9
#======================================================================================================================
9
10
10
11
bcg-echo "Writing Nginx WebDAV config..."
11
- esh -o /etc/nginx/sites/localhost.conf \
12
- /etc/templates /localhost.conf.esh
12
+ esh -o ${NGINX_LOCALHOST_CONF} \
13
+ ${BCG_TEMPLATES} /localhost.conf.esh
13
14
bcg-done
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ set -euo pipefail
4
+ export BCG_E=` basename ${0} `
5
+
6
+
7
+ # ======================================================================================================================
8
+ # Get Nginx Version.
9
+ # ======================================================================================================================
10
+
11
+ cd /tmp
12
+
13
+ VERSION=$( cat VERSION)
14
+ bcg-debug " Nginx version ${VERSION} ."
15
+
16
+
17
+ # ======================================================================================================================
18
+ # Install Nginx WebDAV extension and dependencies.
19
+ # ======================================================================================================================
20
+
21
+ bcg-echo " Installing Nginx v${VERSION} WebDAV extension..."
22
+ apk add --no-cache \
23
+ nginx-mod-http-dav-ext=${VERSION}
24
+ bcg-done
You can’t perform that action at this time.
0 commit comments