|
|
|
@ -1,9 +1,9 @@
|
|
|
|
|
# build app
|
|
|
|
|
FROM golang AS build-env
|
|
|
|
|
|
|
|
|
|
ADD . /paopao-api
|
|
|
|
|
ADD . /paopao-ce
|
|
|
|
|
|
|
|
|
|
WORKDIR /paopao-api
|
|
|
|
|
WORKDIR /paopao-ce
|
|
|
|
|
|
|
|
|
|
RUN CGO_ENABLED=0 go build .
|
|
|
|
|
|
|
|
|
@ -14,14 +14,13 @@ ENV TZ=Asia/Shanghai
|
|
|
|
|
|
|
|
|
|
RUN apk update && apk add --no-cache ca-certificates && update-ca-certificates
|
|
|
|
|
|
|
|
|
|
COPY --from=build-env /paopao-api/paopao-api /usr/bin/paopao-api
|
|
|
|
|
COPY --from=build-env /paopao-api/comic.ttf /comic.ttf
|
|
|
|
|
COPY --from=build-env /paopao-api/qqwry.dat /qqwry.dat
|
|
|
|
|
COPY --from=build-env /paopao-api/configs /configs
|
|
|
|
|
COPY --from=build-env /paopao-ce/paopao-ce /usr/bin/paopao-ce
|
|
|
|
|
COPY --from=build-env /paopao-ce/comic.ttf /comic.ttf
|
|
|
|
|
COPY --from=build-env /paopao-ce/configs /configs
|
|
|
|
|
|
|
|
|
|
EXPOSE 8000
|
|
|
|
|
|
|
|
|
|
CMD ["paopao-api"]
|
|
|
|
|
CMD ["paopao-ce"]
|
|
|
|
|
|
|
|
|
|
# HEALTHCHECK
|
|
|
|
|
HEALTHCHECK --interval=5s --timeout=3s --retries=3 CMD ps -ef | grep paopao-api || exit 1
|
|
|
|
|
HEALTHCHECK --interval=5s --timeout=3s --retries=3 CMD ps -ef | grep paopao-ce || exit 1
|
|
|
|
|