Skip to content

Commit ccde6eb

Browse files
committed
Merge runtime and rename to Trishul SNMP Suite
1 parent 786e4f1 commit ccde6eb

35 files changed

Lines changed: 2322 additions & 750 deletions

.env

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Trishul SNMP Studio — Configuration
1+
# Trishul SNMP Suite — Configuration
22

33
# ---------------------------------------------------------------------------
44
# Logging
@@ -15,11 +15,16 @@ TRAP_PORT=1162
1515
# ---------------------------------------------------------------------------
1616
# Application Metadata
1717
# ---------------------------------------------------------------------------
18-
APP_NAME=Trishul-SNMP
19-
APP_VERSION=1.3.0
18+
APP_NAME=Trishul SNMP Suite
19+
APP_VERSION=1.4.0
2020
APP_AUTHOR=Sumit Dhaka
2121
APP_DESCRIPTION=Professional SNMP Simulation Tool
2222

23+
# ---------------------------------------------------------------------------
24+
# HTTP Access
25+
# ---------------------------------------------------------------------------
26+
APP_PORT=8080
27+
2328
# ---------------------------------------------------------------------------
2429
# Security
2530
# ---------------------------------------------------------------------------
@@ -28,7 +33,7 @@ SESSION_TIMEOUT=3600
2833
# ---------------------------------------------------------------------------
2934
# CORS
3035
# ---------------------------------------------------------------------------
31-
ALLOWED_ORIGINS=http://localhost:8080
36+
ALLOWED_ORIGINS=http://localhost:8080,http://localhost:8000,http://localhost:8900,http://localhost:8980
3237

3338
# ---------------------------------------------------------------------------
3439
# Auto-Start

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contributing to Trishul-SNMP
1+
# Contributing to Trishul SNMP Suite
22

33
We welcome bug reports, feature work, documentation fixes, and code changes.
44

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Funding options for Trishul-SNMP
1+
# Funding options for Trishul SNMP Suite
22
# These are supported funding model platforms
33

44
github: tosumitdhaka

.github/workflows/ghcr-publish.yml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,6 @@ jobs:
1111
contents: read
1212
packages: write
1313

14-
strategy:
15-
matrix:
16-
include:
17-
- name: backend
18-
context: ./backend
19-
dockerfile: ./backend/Dockerfile
20-
image: ghcr.io/${{ github.repository_owner }}/trishul-snmp-backend
21-
- name: frontend
22-
context: ./frontend
23-
dockerfile: ./frontend/Dockerfile
24-
image: ghcr.io/${{ github.repository_owner }}/trishul-snmp-frontend
25-
2614
steps:
2715
- uses: actions/checkout@v4
2816

@@ -43,13 +31,13 @@ jobs:
4331
username: ${{ github.actor }}
4432
password: ${{ secrets.GITHUB_TOKEN }}
4533

46-
- name: Build and push ${{ matrix.name }} image
34+
- name: Build and push merged application image
4735
uses: docker/build-push-action@v6
4836
with:
49-
context: ${{ matrix.context }}
50-
file: ${{ matrix.dockerfile }}
37+
context: .
38+
file: ./Dockerfile
5139
push: true
5240
platforms: linux/amd64,linux/arm64
5341
tags: |
54-
${{ matrix.image }}:latest
55-
${{ matrix.image }}:${{ env.APP_VERSION }}
42+
ghcr.io/${{ github.repository_owner }}/trishul-snmp-suite:latest
43+
ghcr.io/${{ github.repository_owner }}/trishul-snmp-suite:${{ env.APP_VERSION }}

Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM python:3.10-slim
2+
3+
RUN apt-get update && apt-get install -y \
4+
snmp \
5+
procps \
6+
&& rm -rf /var/lib/apt/lists/*
7+
8+
WORKDIR /app
9+
10+
COPY backend/requirements.txt /tmp/requirements.txt
11+
RUN pip install --no-cache-dir -r /tmp/requirements.txt
12+
13+
COPY backend /app/backend
14+
COPY frontend/src /app/frontend/src
15+
16+
RUN sed -i 's/^mibs :/# mibs :/' /etc/snmp/snmp.conf && \
17+
echo "mibdirs +/app/backend/data/mibs" >> /etc/snmp/snmp.conf && \
18+
echo "mibs +ALL" >> /etc/snmp/snmp.conf
19+
20+
WORKDIR /app/backend
21+
22+
ENV MODULE_NAME="main"
23+
ENV VARIABLE_NAME="app"
24+
ENV PORT=8000
25+
26+
EXPOSE 8000 1061/udp 1162/udp
27+
28+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]

0 commit comments

Comments
 (0)