-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
0 parents
commit 3fab1be
Showing
116 changed files
with
52,654 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# If you prefer the allow list template instead of the deny list, see community template: | ||
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore | ||
# | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
# Go workspace file | ||
go.work | ||
|
||
# environment file | ||
.env |
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,34 @@ | ||
# FROM golang:alpine3.19 as go_builder | ||
|
||
# FROM go_builder as backend | ||
# RUN ["git", "clone", "https://github.com/ling734/hoppscotch-backend-go.git", "/app"] | ||
# WORKDIR /app | ||
# RUN ["go", "mod", "download"] | ||
# RUN ["go", "build", "-o", "./bin/server", "./server.go"] | ||
|
||
FROM nginx:latest | ||
# FROM caddy:latest | ||
WORKDIR /app | ||
COPY template ./template/ | ||
COPY nginx.conf /etc/nginx/ | ||
# COPY aio.Caddyfile /etc/caddy/Caddyfile | ||
COPY --chmod=755 import-meta-env . | ||
COPY --chmod=755 server . | ||
COPY --chmod=755 healthcheck.sh . | ||
|
||
COPY --from=hoppscotch/hoppscotch:latest /site /site | ||
# COPY --from=backend /app/bin/hoppscotch ./hoppscotch | ||
|
||
RUN sed -i "s@/archive.ubuntu.com/@/mirrors.tuna.tsinghua.edu.cn/@g" /etc/apt/sources.list.d/debian.sources && apt-get update | ||
RUN apt install -y tini curl | ||
# RUN apt install -y nodejs npm | ||
# RUN npm install -g @import-meta-env/cli | ||
|
||
HEALTHCHECK --interval=2s CMD /bin/sh /app/healthcheck.sh | ||
ENTRYPOINT [ "tini", "--" ] | ||
# CMD printenv > build.env && npx import-meta-env -x build.env -e build.env -p "/site/**/*" && nginx && /app/server | ||
CMD /app/import-meta-env /site & nginx & /app/server | ||
# CMD /app/import-meta-env /site & /app/server & caddy run --config /etc/caddy/Caddyfile --adapter caddyfile | ||
EXPOSE 3000/tcp | ||
EXPOSE 3100/tcp | ||
EXPOSE 3170/tcp |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Flynn | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 @@ | ||
# hoppscotch-backend-go |
Oops, something went wrong.