1
0
Fork 0

Switch to clang, fix master builds, add lua

master
Ambrose Chua 2021-05-19 22:01:42 +08:00
parent 26e20c35dc
commit 5161b973ae
2 changed files with 16 additions and 8 deletions

View File

@ -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 \

View File

@ -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 / {