From 5e1ede15853eb31d4882d4c45b35c30228466a4d Mon Sep 17 00:00:00 2001 From: n0vad3v Date: Sun, 12 Dec 2021 20:47:23 +0800 Subject: [PATCH 1/2] Update config.json and README.md --- README.md | 13 +++++++------ config.json | 8 ++------ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index c5f3f5b..6b31710 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,13 @@ Download the `webp-server` from [release](https://github.com/webp-sh/webp_server The default `config.json` may look like this. ```json { - "HOST": "127.0.0.1", - "PORT": "3333", - "QUALITY": "80", - "IMG_PATH": "/path/to/pics", - "EXHAUST_PATH": "/path/to/exhaust", - "ALLOWED_TYPES": ["jpg","png","jpeg"] + "HOST": "127.0.0.1", + "PORT": "3333", + "QUALITY": "80", + "IMG_PATH": "/path/to/pics", + "EXHAUST_PATH": "/path/to/exhaust", + "ALLOWED_TYPES": ["jpg","png","jpeg","bmp"], + "ENABLE_AVIF": false } ``` diff --git a/config.json b/config.json index b3385c1..24805a9 100644 --- a/config.json +++ b/config.json @@ -4,10 +4,6 @@ "QUALITY": "80", "IMG_PATH": "./pics", "EXHAUST_PATH": "./exhaust", - "ALLOWED_TYPES": [ - "jpg", - "png", - "jpeg", - "bmp" - ] + "ALLOWED_TYPES": ["jpg","png","jpeg","bmp"], + "ENABLE_AVIF": false } \ No newline at end of file From bc2a986d70524490e8fe2c37ebac6a25fc4c7147 Mon Sep 17 00:00:00 2001 From: n0vad3v Date: Sun, 12 Dec 2021 21:38:27 +0800 Subject: [PATCH 2/2] Add libaom packages to make docker image work --- Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index df31bb7..27671f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,13 @@ FROM alpine COPY --from=builder /build/webp-server /usr/bin/webp-server COPY --from=builder /build/config.json /etc/config.json +COPY --from=builder /usr/lib/libaom.a /usr/lib/libaom.a +COPY --from=builder /usr/lib/libaom.so /usr/lib/libaom.so +COPY --from=builder /usr/lib/libaom.so.3 /usr/lib/libaom.so.3 +COPY --from=builder /usr/lib/libaom.so.3 /usr/lib/libaom.so.3 +COPY --from=builder /usr/lib/libaom.so.3.2.0 /usr/lib/libaom.so.3.2.0 + + WORKDIR /opt VOLUME /opt/exhaust -CMD ["/usr/bin/webp-server", "--config", "/etc/config.json"] \ No newline at end of file +CMD ["/usr/bin/webp-server", "--config", "/etc/config.json"]