Browse Source

Switch to clang, fix master builds, add lua

master
Ambrose Chua 7 months ago
parent
commit
5161b973ae
  1. 17
      Dockerfile
  2. 7
      lwan.conf

17
Dockerfile

@ -9,14 +9,27 @@ ARG version="master"
# build root
WORKDIR /build
RUN apk add --no-cache git upx ca-certificates alpine-sdk cmake zlib-dev
RUN apk add \
git \
ca-certificates \
alpine-sdk \
clang \
cmake \
zlib-static zlib-dev \
lua5.1 lua5.1-dev \
linux-headers
# source
RUN git clone https://github.com/lpereira/lwan -b ${version} .
# build
RUN mkdir build \
&& cd build \
&& cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS="-static" -DCMAKE_C_FLAGS="-static" \
&& cmake \
.. \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_EXE_LINKER_FLAGS="-static" \
-DCMAKE_C_FLAGS="-static" \
&& make
# compress and test
#RUN cd build \

7
lwan.conf

@ -5,9 +5,6 @@ keep_alive_timeout = 15
# release builds.)
quiet = false
# Set SO_REUSEPORT=1 in the master socket.
reuse_port = false
# Value of "Expires" header. Default is 1 month and 1 week.
expires = 1M 1w
@ -19,9 +16,7 @@ proxy_protocol = false
# Enable straitjacket by default. The `drop_capabilities` option is `true`
# by default. Other options may require more privileges.
straitjacket {
drop_capabilities = false
}
straitjacket
listener *:8080 {
serve_files / {

Loading…
Cancel
Save