-
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.
reorganize the repo, tidy up, fix Dockerfile and DC deployment, fix d…
…emo_sockets.json
- Loading branch information
1 parent
266f180
commit 20ed902
Showing
10 changed files
with
96 additions
and
90 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,10 +1,16 @@ | ||
!.docker/resolv.conf | ||
.git* | ||
.git/* | ||
.github/* | ||
*.example | ||
*.backup | ||
.gitignore | ||
.env | ||
.env.example | ||
|
||
build/* | ||
deployments/* | ||
|
||
dish | ||
main | ||
|
||
# README.md | ||
# Dockerfile | ||
# docker-compose.yml | ||
|
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,5 +1,7 @@ | ||
.env | ||
savla-dish | ||
.vscode/ | ||
vendor/ | ||
.vscode/* | ||
vendor/* | ||
|
||
# binaries | ||
dish | ||
main |
This file was deleted.
Oops, something went wrong.
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,37 @@ | ||
# | ||
# dish / Dockerfile | ||
# | ||
|
||
# | ||
# stage 0 --- build | ||
# | ||
|
||
# https://hub.docker.com/_/golang | ||
|
||
ARG ALPINE_VERSION 3.20 | ||
ARG GOLANG_VERSION 1.23 | ||
FROM golang:${GOLANG_VERSION}-alpine${ALPINE_VERSION} AS dish-build | ||
|
||
LABEL org.opencontainers.image.authors="[email protected], [email protected], [email protected]" | ||
|
||
ARG APP_NAME dish | ||
|
||
WORKDIR /go/src/${APP_NAME} | ||
COPY . /go/src/${APP_NAME} | ||
|
||
# build and install the binary | ||
RUN go install cmd/dish/main.go | ||
|
||
# | ||
# stage 1 --- release | ||
# | ||
|
||
FROM alpine:${ALPINE_VERSION} AS dish-release | ||
|
||
WORKDIR /opt | ||
|
||
COPY configs/demo_sockets.json /opt/ | ||
COPY --from=dish-build /go/bin/main /opt/dish | ||
RUN ln -s /opt/dish /usr/local/bin | ||
|
||
ENTRYPOINT [ "dish" ] |
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,25 @@ | ||
{ | ||
"items": { | ||
"vxn_dev_https": { | ||
"socket_name": "vxn-dev HTTPS", | ||
"host_name": "https://vxn.dev", | ||
"port_tcp": 443, | ||
"path_http": "/", | ||
"expected_http_code_array": [ 200 ] | ||
}, | ||
"text.n0p.cz_https": { | ||
"socket_name": "text-n0p-cz HTTPS", | ||
"host_name": "https://text.n0p.cz", | ||
"port_tcp": 443, | ||
"path_http": "/?", | ||
"expected_http_code_array": [ 401 ] | ||
}, | ||
"openttd TCP": { | ||
"socket_name": "openttd TCP", | ||
"host_name": "ottd.vxn.dev", | ||
"port_tcp": 3979, | ||
"path_http": "", | ||
"expected_http_code_array": [] | ||
} | ||
} | ||
} |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
# dish / _EXAMPLE_ docker-compose.yml file | ||
# mainly used for dish binary building process, as the binary itself does not serve any HTTP | ||
name: ${PROJECT_NAME} | ||
|
||
services: | ||
dish: | ||
image: ${DOCKER_IMAGE_TAG} | ||
container_name: ${DOCKER_DEV_CONTAINER} | ||
restart: "no" | ||
command: ["-verbose"] | ||
build: | ||
context: .. | ||
dockerfile: build/Dockerfile | ||
args: | ||
ALPINE_VERSION: ${ALPINE_VERSION} | ||
APP_NAME: ${APP_NAME} | ||
APP_FLAGS: ${APP_FLAGS} | ||
GOLANG_VERSION: ${GOLANG_VERSION} | ||
|
This file was deleted.
Oops, something went wrong.