Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Beniamiiin committed May 20, 2024
1 parent af5ae85 commit be31f46
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ jobs:
LOKI_URL=${{ secrets.LOKI_URL }}
DB_URL=${{ secrets.DB_URL }}
QUORUM=${{ vars.QUORUM }}
MIN_YES_PERCENTAGE=${{ vars.MIN_YES_PERCENTAGE }}
MAX_REQUIRED_SEEDERS_COUNT=${{ vars.MAX_REQUIRED_SEEDERS_COUNT }}
YES_VOTES_TO_OVERCOME_NO=${{ vars.YES_VOTES_TO_OVERCOME_NO }}
MIN_YES_VOTES_PERCENTAGE=${{ vars.MIN_YES_VOTES_PERCENTAGE }}
MIN_REQUIRED_YES_VOTES=${{ vars.MIN_REQUIRED_YES_VOTES }}
TELEGRAM_ACCESS_GOVERNANCE_BOT_TOKEN=${{ secrets.TELEGRAM_ACCESS_GOVERNANCE_BOT_TOKEN }}
MEMBERS_CHAT_ID=${{ vars.MEMBERS_CHAT_ID }}
SEEDERS_CHAT_ID=${{ vars.SEEDERS_CHAT_ID }}
Expand Down
2 changes: 1 addition & 1 deletion configs/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type ProposalStateServiceConfig struct {
Quorum float64 `env:"QUORUM"` // 30% initial parameter for quorum
MaxRequiredSeedersCount float64 `env:"MAX_REQUIRED_SEEDERS_COUNT"` // But not more than 10 votes
MinYesVotesPercentage float64 `env:"MIN_YES_VOTES_PERCENTAGE"` // Minimum 10% of votes should be "Yes"
MinRequiredYesVotes float64 `env:"MIN_REQUIRED_YE_VOTES"` // But not less than 3
MinRequiredYesVotes float64 `env:"MIN_REQUIRED_YES_VOTES"` // But not less than 3
YesVotesToOvercomeNo float64 `env:"YES_VOTES_TO_OVERCOME_NO"` // 50% "yes" votes to overcome one "No vote"
}

Expand Down
27 changes: 18 additions & 9 deletions deployments/proposal_state_service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,36 @@ FROM golang:1.21
ARG ENVIRONMENT
ENV ENVIRONMENT=$ENVIRONMENT

ARG INITIAL_SEEDERS
ENV INITIAL_SEEDERS=$INITIAL_SEEDERS

ARG VOTING_DURATION_DAYS
ENV VOTING_DURATION_DAYS=$VOTING_DURATION_DAYS

ARG LOKI_URL
ENV LOKI_URL=$LOKI_URL

ARG DB_URL
ENV DB_URL=$DB_URL

ARG QUORUM
ENV QUORUM=$QUORUM

ARG MAX_REQUIRED_SEEDERS_COUNT
ENV MAX_REQUIRED_SEEDERS_COUNT=$MAX_REQUIRED_SEEDERS_COUNT

ARG YES_VOTES_TO_OVERCOME_NO
ENV YES_VOTES_TO_OVERCOME_NO=$YES_VOTES_TO_OVERCOME_NO

ARG MIN_YES_VOTES_PERCENTAGE
ENV MIN_YES_VOTES_PERCENTAGE=$MIN_YES_VOTES_PERCENTAGE

ARG MIN_REQUIRED_YES_VOTES
ENV MIN_REQUIRED_YES_VOTES=$MIN_REQUIRED_YES_VOTES

ARG TELEGRAM_ACCESS_GOVERNANCE_BOT_TOKEN
ENV TELEGRAM_ACCESS_GOVERNANCE_BOT_TOKEN=$TELEGRAM_ACCESS_GOVERNANCE_BOT_TOKEN

ARG TELEGRAM_VOTE_BOT_TOKEN
ENV TELEGRAM_VOTE_BOT_TOKEN=$TELEGRAM_VOTE_BOT_TOKEN

ARG MEMBERS_CHAT_ID
ENV MEMBERS_CHAT_ID=$MEMBERS_CHAT_ID

ARG SEEDERS_CHAT_ID
ENV SEEDERS_CHAT_ID=$SEEDERS_CHAT_ID

WORKDIR /opt/src

COPY ./go.mod .
Expand Down

0 comments on commit be31f46

Please sign in to comment.