forked from Mereithhh/van-nav
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wanglu
committed
Apr 10, 2022
1 parent
ba1c613
commit 4f88af2
Showing
6 changed files
with
45 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
ui | ||
**/node_modules | ||
**/dist | ||
**/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,35 @@ | ||
FROM ubuntu:20.04 | ||
FROM mereith/node-gyp:14 AS feBuilder | ||
WORKDIR /app | ||
COPY ./nav /app/nav | ||
# VOLUME [ "/data" ] | ||
EXPOSE 8233 | ||
ENTRYPOINT [ "/app/nav" ] | ||
# RUN apk add --no-cache --virtual .build-deps alpine-sdk python | ||
COPY . . | ||
RUN yarn config set registry https://registry.npm.taobao.org && yarn global add typescript | ||
RUN cd /app && cd ui/admin && yarn && yarn build && cd ../.. | ||
RUN cd ui/website && yarn && yarn build && cd ../.. | ||
RUN cd /app && mkdir -p public/admin | ||
RUN cp -r ui/website/build/* public/ | ||
RUN cp -r ui/admin/dist/* public/admin/ | ||
RUN sed -i 's/\/assets/\/admin\/assets/g' public/admin/index.html | ||
|
||
|
||
FROM golang:alpine AS binarybuilder | ||
RUN apk --no-cache --no-progress add git | ||
WORKDIR /app | ||
COPY . . | ||
COPY --from=feBuilder /app/public /app/public | ||
RUN cd /app && ls -la && go mod tidy && go build . | ||
|
||
|
||
|
||
FROM alpine:latest | ||
ENV TZ="Asia/Shanghai" | ||
RUN apk --no-cache --no-progress add \ | ||
ca-certificates \ | ||
tzdata && \ | ||
cp "/usr/share/zoneinfo/$TZ" /etc/localtime && \ | ||
echo "$TZ" > /etc/timezone | ||
WORKDIR /app | ||
COPY --from=binarybuilder /app/nav /app/ | ||
|
||
VOLUME ["/app/data"] | ||
EXPOSE 6412 | ||
ENTRYPOINT [ "/app/nav" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FROM node:14-alpine | ||
RUN apk add --no-cache g++ gcc make python3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.0.7 | ||
1.0.10 |