init
This commit is contained in:
27
Dockerfile
Normal file
27
Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user