Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/internal/database/db_telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ func UpdateTelegramValidatorSubStatus(db *gorm.DB, chatID int64, chainID, addr,
// ============================ Telegram govdao =============================================
// status of govdao handlers
func GetStatusofGovdao(db *gorm.DB, chainID string) ([]Govdao, error) {
var results []Govdao
results := []Govdao{}
query := `
SELECT
id,
Expand Down
20 changes: 8 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
services:
detect-proposal:
build:
build:
context: ./backend
restart: on-failure
container_name: gnomonitoring-backend
volumes:
- ./backend/main.go:/root/main.go
- ./backend/config.yaml:/root/config.yaml
- ./backend/go.mod:/root/go.mod
- ./backend/go.sum:/root/go.sum
- ./backend/db/:/root/db/
- ./backend/config.yaml:/app/config.yaml
- ./backend/db/:/app/db/
ports:
- 8880:8888 #metrics
- 8989:8989 #backend
command: [ "go", "run", "main.go","--disable-report" ]
command: [ "./server", "--disable-report" ]

frontend:
build:
context: ./frontend/gnomonitoring
dockerfile: Dockerfile
context: ./panel
container_name: gnomonitoring-frontend
ports:
- "9191:3000"
- "9191:80"
volumes:
- ./frontend/gnomonitoring/.env.local:/app/.env.local
- ./panel/.env:/app/.env.local
env_file:
- ./frontend/gnomonitoring/.env.local
- ./panel/.env
restart: unless-stopped
12 changes: 12 additions & 0 deletions panel/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM nginx:alpine AS serve
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
9 changes: 9 additions & 0 deletions panel/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
server {
listen 80;
root /usr/share/nginx/html;
index index.html;

location / {
try_files $uri $uri/ /index.html;
}
}
2 changes: 1 addition & 1 deletion panel/src/pages/GovDAO.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function GovDAO() {
setLoading(true)
const params = chain ? `?chain=${chain}` : ''
api.get<GovdaoProposal[]>(`/admin/govdao/proposals${params}`)
.then(setProposals)
.then(data => setProposals(data ?? []))
.catch(() => toast.error('Failed to load proposals'))
.finally(() => setLoading(false))
}, [chain])
Expand Down
1 change: 1 addition & 0 deletions panel/src/pages/Monikers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export default function Monikers() {
</td>
<td className="mono">{m.first_active_block >= 0 ? m.first_active_block.toLocaleString() : '—'}</td>
<td>
<button className="btn btn-ghost btn-sm" onClick={() => { setEditKey(key); setEditValue(m.moniker) }}>Edit</button>
<button className="btn btn-ghost btn-sm" onClick={() => setDelTarget({ chain: m.chain_id, addr: m.addr })} style={{ color: 'var(--status-critical)' }}>Delete</button>
</td>
</tr>
Expand Down
Loading