mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 12:40:07 +00:00
✨ 容器化部署
This commit is contained in:
@@ -3,8 +3,7 @@ RUN apk --no-cache --no-progress add \
|
||||
gcc git musl-dev
|
||||
WORKDIR /dashboard
|
||||
COPY . .
|
||||
RUN cd cmd/dashboard \
|
||||
&& go build -o app -ldflags="-s -w -X github.com/p14yground/nezha/service/dao.Version=`git rev-parse HEAD`"
|
||||
RUN cd cmd/dashboard && go build -o app -ldflags="-s -w -X github.com/p14yground/nezha/service/dao.Version=$(git rev-parse HEAD)"
|
||||
|
||||
FROM alpine:latest
|
||||
RUN apk --no-cache --no-progress add \
|
||||
@@ -15,5 +14,5 @@ COPY ./resource ./resource
|
||||
COPY --from=binarybuilder /dashboard/cmd/dashboard/app ./app
|
||||
|
||||
VOLUME ["/dashboard/data"]
|
||||
EXPOSE 3000
|
||||
CMD ["/dashboard/app"]
|
||||
EXPOSE [3000, 5555]
|
||||
CMD ["/dashboard/app"]
|
||||
|
||||
Reference in New Issue
Block a user