Skip to content

Commit

Permalink
Initial Push
Browse files Browse the repository at this point in the history
  • Loading branch information
EpicnessTwo committed Oct 6, 2023
0 parents commit 4d4b60d
Show file tree
Hide file tree
Showing 7 changed files with 1,065 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/docker-image.yml
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 }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
google.json
.idea/
12 changes: 12 additions & 0 deletions Dockerfile
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"]
19 changes: 19 additions & 0 deletions docker-compose.yml
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
Loading

0 comments on commit 4d4b60d

Please sign in to comment.