Skip to content

Commit

Permalink
ui fix, docker image update, github action added for release
Browse files Browse the repository at this point in the history
  • Loading branch information
utkarsh-1905 committed Jul 17, 2023
1 parent 85eb013 commit 1da9a9f
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 7 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Deploying Image on Release

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Logging into Github Container Registry
run: |
echo $CR_PAT | docker login ghcr.io -u utkarsh-1905 --password-stdin
env:
CR_PAT: ${{ secrets.CR_PAT }}
- name: Building Docker Image
run: |
docker build . -t ghcr.io/utkarsh-1905/docker-network-vis:${{ github.sha }}
- name: Pushing Docker Image
run: |
docker push ghcr.io/utkarsh-1905/docker-network-vis:${{ github.sha }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
TODO.md
TODO.md
start.dev.sh
*.exe
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ LABEL traefik.port=80
LABEL traefik.http.routers.network.rule="Host(`network.utkarsh.ninja`)"
LABEL traefik.http.routers.network.tls=true
LABEL traefik.http.routers.network.tls.certresolver="lets-encrypt"
LABEL org.opencontainers.image.source="https://github.com/utkarsh-1905/docker-network-vis"
EXPOSE 3000
CMD [ "./main.exe" ]
11 changes: 9 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### Current UI
### How to use

![UI](./assets/ui-1.png)
1. Clone the repository
2. Run the start.sh bash file in your linux terminal to build and start the container on local port 6904.
3. Open your browser and go to localhost:6904 and you should see the app running and displaying all your containers in your network buckets.

### Why to use?

1. It is a very simple application to give you a quick overview of all your containers in your network buckets.
2. It helps in debugging and testing your containers.
Binary file removed assets/ui-1.png
Binary file not shown.
3 changes: 2 additions & 1 deletion start.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sudo docker run -d -p 6904:3000 --rm --net web --name docker-vis -v /var/run/docker.sock:/var/run/docker.sock docker-vis:latest
sudo docker build . -t docker-vis:latest
sudo docker run -d -p 6904:3000 --rm --net web --net bridge --name docker-vis -v /var/run/docker.sock:/var/run/docker.sock docker-vis:latest
4 changes: 3 additions & 1 deletion utils/error.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package util

import "log"

func HandleError(err error) {
if err != nil {
panic(err)
log.Fatal(err)
}
}
4 changes: 2 additions & 2 deletions views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h1>Docker Network Visualizer</h2>
</header>
<main>
<div class="pingtest">
<!-- <div class="pingtest">
<div class="ping">Ping Containers to check Network</div>
<select name="c1" class="c1">
{{range .networks}}
Expand All @@ -35,7 +35,7 @@ <h1>Docker Network Visualizer</h2>
{{end}}
</select>
<button class="pingbtn">Ping</button>
</div>
</div> -->
<hr />
<div class="networks-container">
<h2>Networks</h2>
Expand Down

0 comments on commit 1da9a9f

Please sign in to comment.