File size: 816 Bytes
f2dd37c
 
 
378af5a
f2dd37c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM golang:1.24.1-alpine3.20 AS builder
WORKDIR /app
RUN apk add --no-cache git make gcc musl-dev sqlite-dev
RUN git clone https://github.com/hsp1020/stremthru.git .
RUN go mod download && make build

FROM alpine:3.20
WORKDIR /app
COPY --from=builder /app/stremthru .

RUN apk add --no-cache libc6-compat sqlite && \
    mkdir -p /app/data && \
    touch /app/data/stremthru.db && \
    chown -R 1000:1000 /app/data && \
    chmod -R 755 /app/data

# Hugging Face ํ˜ธํ™˜์„ฑ ์„ค์ •
ENV PORT=7860
ENV STREMTHRU_DATA_DIR=/app/data
EXPOSE 7860

USER 1000
# Dockerfile ์ˆ˜์ • (ํฌํŠธ ๊ฐ•์ œ ์ง€์ •)
ENTRYPOINT ["sh", "-c", "./stremthru --port 7860 --bind 0.0.0.0"]
# HEALTHCHECK ์ถ”๊ฐ€ (Dockerfile ์ตœํ•˜๋‹จ)
HEALTHCHECK --interval=30s --timeout=3s \
  CMD wget --quiet --tries=1 --spider http://localhost:7860 || exit 1