From fc2019680a0adb9be71298787accd79df9588923 Mon Sep 17 00:00:00 2001 From: TopchetoEU <36534413+TopchetoEU@users.noreply.github.com> Date: Thu, 27 Nov 2025 14:47:17 +0200 Subject: [PATCH] fix build script --- Dockerfile | 17 ++++++++--------- Makefile | 8 ++++---- deps/mklua | 2 +- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0d83e66..573b56f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,32 +1,31 @@ FROM alpine AS build -RUN apk add --no-cache lua5.4-dev lua5.4-luv make gcc pkgconf util-linux-misc +RUN apk add --no-cache lua5.4-dev lua5.4-luv build-base pkgconf util-linux-misc WORKDIR /build COPY src ./src/ COPY lib ./lib/ COPY Makefile ./Makefile +COPY deps ./deps RUN ln -s /usr/lib/liblua-5.4.so.0 /usr/lib/liblua.so.5.4 -RUN make +RUN make LUA=lua5.4 FROM alpine EXPOSE 8080 -VOLUME /plugins -VOLUME /views -VOLUME /static -VOLUME /config +VOLUME /data STOPSIGNAL SIGINT HEALTHCHECK --interval=30s --start-period=1s CMD curl localhost:8080/.well-known/keepalive | grep "OK" -ENTRYPOINT ./bin/website -WORKDIR /app +WORKDIR / RUN apk add --no-cache lua5.4 lua5.4-luv -COPY --from=build ./bin/website . +COPY --from=build /build/bin/website . + +CMD [ "./website", "./data/config.lua" ] diff --git a/Makefile b/Makefile index 30e7d4a..bd68d1f 100644 --- a/Makefile +++ b/Makefile @@ -42,15 +42,15 @@ compile_flags.txt: printf -- '$(foreach v,$(CCARGS) $(LDARGS),\n$v)' > compile_flags.txt $(OUTPUT): $(LIBS) $(MKLUA_OUT) $(SOURCES) | $(dir $(OUTPUT)) - $(CC) $(CCARGS) $(LDARGS) $^ -o $@ + $(CC) $(CCARGS) $^ $(LDARGS) -o $@ $(MKLUA_OUT): $(DEPS) | $(dir $(MKLUA_OUT)) $(MKLUA) $(MKLUA) $(MKLUA_FLAGS) $(MKLUA_ENTRY) -o $@ -deps/mklua/mklua: - -$(MKLUA): +deps/mklua/Makefile: git submodule update --init deps/mklua + +$(MKLUA): deps/mklua/Makefile make -C deps/mklua %/: mkdir -p $@ diff --git a/deps/mklua b/deps/mklua index 318928d..0c05556 160000 --- a/deps/mklua +++ b/deps/mklua @@ -1 +1 @@ -Subproject commit 318928ddbc642c3318c27e5bea2d43ae05740cd9 +Subproject commit 0c05556eb12e83f18f4ce89e8c2c3ccdb0c5a319