-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (21 loc) · 1009 Bytes
/
Copy pathDockerfile
File metadata and controls
22 lines (21 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# teploy-gateway — OSS AI router. Built server-side by teploy from this
# Dockerfile and deployed as an internal service on the teploy network
# (reachable by other containers at the app's network alias, never public).
FROM golang:1.24-alpine AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -ldflags "-s -w" -o /out/teploy-gateway .
FROM alpine:3.20
RUN apk add --no-cache ca-certificates su-exec && adduser -D -u 10001 gateway
COPY --from=build /out/teploy-gateway /usr/local/bin/teploy-gateway
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Provider keys, minted project tokens, the admin token, and usage totals
# live here — persist them on a volume so a redeploy keeps existing keys.
# The entrypoint chowns this mount to the gateway user, then drops root.
VOLUME /data
EXPOSE 8089
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["serve", "--addr", "0.0.0.0:8089", "--data-dir", "/data"]