refactor: remove AX_DB_PATH env var, fix Dockerfile for src/ layout
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -4,12 +4,13 @@ WORKDIR /app
|
||||
|
||||
ENV GOTOOLCHAIN=auto
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
COPY src/go.mod src/go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . ./
|
||||
COPY src/ ./
|
||||
|
||||
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o /ax .
|
||||
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
|
||||
go build -ldflags="-s -w" -trimpath -o /ax .
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
@@ -17,10 +18,8 @@ RUN apk --no-cache add ca-certificates
|
||||
|
||||
WORKDIR /data
|
||||
|
||||
COPY --from=builder /ax /app/ax
|
||||
|
||||
ENV AX_DB_PATH=/data/.ax.db
|
||||
COPY --from=builder /ax /usr/local/bin/ax
|
||||
|
||||
EXPOSE 7000
|
||||
|
||||
ENTRYPOINT ["/app/ax", "serve"]
|
||||
ENTRYPOINT ["ax"]
|
||||
|
||||
Reference in New Issue
Block a user