-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'remotes/originf/main' into mirror-revert
- Loading branch information
Showing
7 changed files
with
92 additions
and
5 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 |
---|---|---|
|
@@ -29,10 +29,17 @@ jobs: | |
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push default image | ||
- name: Build and push indexer container | ||
uses: docker/[email protected] | ||
with: | ||
context: . # Because GH actions are for kids and put protection on everything; https://stackoverflow.com/a/71159809/11276254 | ||
context: . | ||
push: true | ||
tags: | | ||
ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }} | ||
file: dockerfile.indexer | ||
tags: ghcr.io/${{ github.repository }}/indexer:${{ env.IMAGE_TAG }} | ||
- name: Build and push services container | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
push: true | ||
file: dockerfile.services | ||
tags: ghcr.io/${{ github.repository }}/services:${{ env.IMAGE_TAG }} |
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,26 @@ | ||
[db] | ||
host = "localhost" # env DB_HOST | ||
port = 3306 # env DB_PORT | ||
database = "" # env DB_DATABASE | ||
username = "" # env DB_USERNAME Should have only read access! | ||
password = "" # env DB_PASSWORD | ||
log_queries = false | ||
|
||
[logger] | ||
level = "DEBUG" | ||
file = "./logs/flare-indexer.log" | ||
console = false | ||
|
||
[services] | ||
address = "0.0.0.0:8000" # address to listen on | ||
|
||
[chain] | ||
address_hrp = "costwo" | ||
chain_id = 114 | ||
# node rpc url, e.g., | ||
# http://xxx.xx.xxx.xxx:xxxx/ext/C/rpc; env ETH_RPC_URL; | ||
eth_rpc_url = "node rpc address" | ||
api_key = "" # from env API_KEY (if neede to access the node rpc) | ||
|
||
[contract_addresses] | ||
voting = "0x694905ca5f9F6c49f4748E8193B3e8053FA9E7E4" # env VOTING_CONTRACT_ADDRESS |
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,26 @@ | ||
[db] | ||
host = "localhost" # env DB_HOST | ||
port = 3306 # env DB_PORT | ||
database = "" # env DB_DATABASE | ||
username = "" # env DB_USERNAME Should have only read access! | ||
password = "" # env DB_PASSWORD | ||
log_queries = false | ||
|
||
[logger] | ||
level = "DEBUG" | ||
file = "./logs/flare-indexer.log" | ||
console = false | ||
|
||
[services] | ||
address = "0.0.0.0:8000" # address to listen on | ||
|
||
[chain] | ||
address_hrp = "flare" | ||
chain_id = 14 | ||
# node rpc url, e.g., | ||
# http://xxx.xx.xxx.xxx:xxxx/ext/C/rpc; env ETH_RPC_URL; | ||
eth_rpc_url = "node rpc address" | ||
api_key = "" # from env API_KEY (if neede to access the node rpc) | ||
|
||
[contract_addresses] | ||
voting = "0x12b3079D5b65a17EFD1665d9731FB0Adb46F14e4" # env VOTING_CONTRACT_ADDRESS |
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
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,27 @@ | ||
# build executable | ||
FROM golang:1.18 AS builder | ||
|
||
WORKDIR /build | ||
|
||
# Copy and download dependencies using go mod | ||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
|
||
# Copy the code into the container | ||
COPY . ./ | ||
|
||
# Build the applications | ||
RUN go build -o /app/flare_services ./services/main/services.go | ||
|
||
FROM debian:latest AS execution | ||
|
||
ARG deployment=flare | ||
|
||
RUN apt-get -y update && apt-get -y install curl | ||
|
||
WORKDIR /app | ||
COPY --from=builder /app/flare_services . | ||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
COPY ./docker/indexer/config_${deployment}_services.toml ./config.toml | ||
|
||
CMD ["./flare_services", "--config", "/app/config.toml" ] |