-
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add web panel and related backend APIs (#230)
* add web project * update navbar * add the server backend * enable basic auth * update web config * update auto CI action * update auto CI action * update auto CI action * fix lint warnings * fix lint warnings * add basic info API * refactor the internal server * add the login page * update layout * add logout button * adjust the space * update pages * remove web * add web project * add web project * update link style * add login API * add user context * set menu item color * set menu style * add svg icons * load basic info * fix the time format * update the theme switch * update the stat component * remove debug info * update the layout * load basic info * load basic info * check the credential * check the credential * fix the credential issue * fix the credential issue * fix SSR issue * gracefully shutdown the internal server * add domains page * fix the nav bar * add domain card * add domain card * update navbar * refactor the class name * add modal dialog * add modal dialog * remove selected domain * rename the function * add next js config * update config * remove icons * add domain API * remove unused code * load domains * remove domain * remove domain * add provider API * add provider API * update user store * refactor the pages * check domain length * clear the form fields * set the default height * adjust the layout * adjust the layout * load providers * add searchable dropdown list * implement the provider settings * fix the misspelling * rewrite the URL from the server side * update the github actions * update the Dockerfile * update the go generate command * update the Dockerfile * update the github actions * update the README file * update the README file * update the README file
- Loading branch information
Showing
51 changed files
with
7,313 additions
and
56 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
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 |
---|---|---|
|
@@ -45,5 +45,6 @@ test_configs/ | |
/vendor | ||
|
||
dist/ | ||
out/ | ||
|
||
.vscode |
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,8 +1,25 @@ | ||
# Stage 1: Build the Next.js frontend | ||
FROM node:18-alpine AS web-builder | ||
WORKDIR /web | ||
# Copy the Next.js project files into the image | ||
COPY ./web/package.json ./web/package-lock.json ./ | ||
# Install dependencies | ||
RUN npm install | ||
# Copy the rest of the Next.js project files | ||
COPY ./web . | ||
# Build the Next.js project | ||
RUN npm run build | ||
|
||
# Stage 2: Build the Go backend | ||
FROM golang:alpine AS builder | ||
WORKDIR /godns | ||
ADD . . | ||
# Copy the Next.js build from the previous stage | ||
COPY --from=web-builder /web/out ./web/out | ||
RUN go generate ./... | ||
RUN CGO_ENABLED=0 go build -o godns cmd/godns/godns.go | ||
|
||
# Final stage: Copy the Go binary into a distroless image | ||
FROM gcr.io/distroless/base | ||
COPY --from=builder /godns/godns /godns | ||
ENTRYPOINT ["/godns"] |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
Oops, something went wrong.