This commit is contained in:
2025-09-08 02:21:37 +02:00
parent 396c3c9b44
commit 0fe4bad133
40 changed files with 1159 additions and 164 deletions

27
Dockerfile Normal file
View File

@@ -0,0 +1,27 @@
FROM alpine:latest
# runtime dependencies including C++ libraries for Bun
RUN apk add --no-cache curl bash ca-certificates libstdc++ libgcc
WORKDIR /app
# the pre-built binary with embedded assets
COPY craftstation .
# non-root user
RUN addgroup -g 1001 -S craftstation && \
adduser -S craftstation -u 1001 -G craftstation && \
chown craftstation:craftstation /app/craftstation
USER craftstation
ENV BUN_INSTALL="/home/craftstation/.bun"
ENV PATH="$BUN_INSTALL/bin:${PATH}"
EXPOSE 3000
ENV PORT=3000
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
CMD curl -f http://localhost:3000/ || exit 1
CMD ["./craftstation"]