-
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
1 parent
681ed15
commit 3a6c663
Showing
6 changed files
with
84 additions
and
3 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
.env | ||
.env | ||
./listener/src/tmp/* |
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 |
---|---|---|
@@ -1 +1,18 @@ | ||
# validator-monitoring | ||
# validator-monitoring | ||
|
||
## Description | ||
|
||
This repository contains the code for the validator monitoring system. The system is designed to listen signatures request from different networks validate them and store the results in a database. | ||
|
||
## Running the system | ||
|
||
**Requirements:** | ||
|
||
- docker | ||
- docker-compose | ||
|
||
**Steps:** | ||
|
||
1. Clone the repository | ||
2. Run `docker-compose up` (production) or `docker compose -f docker-compose.dev.yml up` (development) in the root directory of the repository | ||
3. Access database UI at `http://localhost:8081`. |
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,25 @@ | ||
version: "3.9" | ||
|
||
services: | ||
listener: | ||
extends: | ||
file: docker-compose.yml | ||
service: listener | ||
build: | ||
context: listener | ||
dockerfile: Dockerfile.dev | ||
volumes: | ||
- ./listener/src:/app/src | ||
|
||
mongo: | ||
extends: | ||
file: docker-compose.yml | ||
service: mongo | ||
|
||
ui: | ||
extends: | ||
file: docker-compose.yml | ||
service: ui | ||
|
||
volumes: | ||
mongo-data: |
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
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,35 @@ | ||
# Start from the latest golang base image | ||
FROM golang:1.22.0-alpine3.19 | ||
|
||
# Set the Current Working Directory inside the container. | ||
WORKDIR /app | ||
|
||
# Install system dependencies required for Air and your application | ||
RUN apk add --no-cache git | ||
|
||
# Install Air | ||
RUN go install github.com/cosmtrek/air@latest | ||
|
||
# Copy the Air configuration file (if you have one) into the container. | ||
# If you don't have a custom .air.toml, you can skip this step, | ||
# and Air will use its default configuration. | ||
# COPY .air.toml . (Uncomment if you have a custom Air config) | ||
|
||
# Copy go module files. | ||
COPY go.mod . | ||
COPY go.sum . | ||
|
||
# Download dependencies. | ||
# Doing this before copying the entire source code | ||
# utilizes Docker's cache to speed up builds. | ||
RUN go mod download | ||
|
||
# Expect source code to be mounted at this directory rather than copied | ||
# This is the change for development mode. | ||
VOLUME ["/app/src"] | ||
|
||
# Set the Current Working Directory inside the container to the src directory. | ||
WORKDIR /app/src | ||
|
||
# Command to run the application using Air for live reloading. | ||
CMD ["air"] |
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