-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
3 changed files
with
36 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,22 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ "*" ] | ||
pull_request: | ||
branches: [ "*" ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build the Docker image | ||
run: docker build --tag tgp --target deploy . | ||
- run: | ||
docker run tgp test -f /app/tgp | ||
- run: | ||
docker run tgp test -f /app/config.toml |
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,12 @@ | ||
FROM docker.io/golang:1.20-alpine AS build | ||
WORKDIR /app | ||
ADD . ./ | ||
RUN go mod download && go build ./cmd/tgp | ||
|
||
FROM docker.io/golang:1.20-alpine AS deploy | ||
RUN apk add --no-cache gcompat | ||
WORKDIR /app | ||
COPY --from=build /app/tgp ./ | ||
ADD config.toml ./ | ||
# EXPOSE 6666 | ||
CMD ./tgp config.toml |
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 @@ | ||
listen_url = "0.0.0.0:6666" | ||
secret = "dd000102030405060708090a0b0c0d0e0f" |