-
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
0 parents
commit 4d4b60d
Showing
7 changed files
with
1,065 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,18 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set commit SHA | ||
id: commit_sha | ||
run: echo "::set-output name=SHA::$(git rev-parse --short ${{ github.sha }})" | ||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile --tag dualping:${{ steps.commit_sha.outputs.SHA }} |
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,3 @@ | ||
node_modules/ | ||
google.json | ||
.idea/ |
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 node:20 | ||
|
||
WORKDIR /app | ||
|
||
RUN apt-get update && apt-get install -y iputils-ping | ||
|
||
COPY package.json package-lock.json ./ | ||
RUN npm install | ||
|
||
COPY run.js ./ | ||
|
||
CMD ["node", "run.js"] |
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 @@ | ||
version: '3' | ||
services: | ||
dualping: | ||
build: . | ||
# tty: true | ||
# stdin_open: true | ||
volumes: | ||
- ./google.json:/app/google.json | ||
cap_add: | ||
- NET_RAW | ||
environment: | ||
- TTY_MODE=false | ||
- LOCAL_ROUTER=10.0.0.1 | ||
- INTERNET_IP=1.1.1.1 | ||
- DISCORD_WEBHOOK_URL=https://discordapp.com/api/webhooks/xxx/yyy | ||
- [email protected] | ||
- LOCATION=New Location Test | ||
- PING_COUNT=3 | ||
restart: unless-stopped |
Oops, something went wrong.