diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..da5a12107 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,127 @@ +name: Build +on: + push: + branches: + - 'master' + tags: + - 'v*.*.*' + pull_request: + branches: + - 'master' + +jobs: + build: + name: Build + runs-on: ubuntu-latest + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true + DOCKER_REGISTRY: ghcr.io + DOCKER_IMAGE_BASE: ${{ github.repository }} + steps: + - name: Check out the repo + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Log in to the registry + uses: docker/login-action@v1 + with: + registry: ${{ env.DOCKER_REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + # Elastic + + - name: Elastic image tags & labels + id: meta-elastic + uses: docker/metadata-action@v3 + with: + images: ${{ env.DOCKER_IMAGE_BASE }}-elastic + + - name: Elastic image build & push + uses: docker/build-push-action@v2 + with: + context: . + file: build/elastic/Dockerfile + push: true + cache-from: type=gha + cache-to: type=gha,mode=max + tags: ${{ steps.meta-elastic.outputs.tags }} + labels: ${{ steps.meta-elastic.outputs.labels }} + + # DB + + - name: DB image tags & labels + id: meta-db + uses: docker/metadata-action@v3 + with: + images: ${{ env.DOCKER_IMAGE_BASE }}-db + + - name: DB + uses: docker/build-push-action@v2 + with: + context: . + file: build/db/Dockerfile + push: true + cache-from: type=gha + cache-to: type=gha,mode=max + tags: ${{ steps.meta-db.outputs.tags }} + labels: ${{ steps.meta-db.outputs.labels }} + + # API + + - name: API image tags & labels + id: meta-api + uses: docker/metadata-action@v3 + with: + images: ${{ env.DOCKER_IMAGE_BASE }}-api + + - name: API image build & push + uses: docker/build-push-action@v2 + with: + context: . + file: build/api/Dockerfile + push: true + cache-from: type=gha + cache-to: type=gha,mode=max + tags: ${{ steps.meta-api.outputs.tags }} + labels: ${{ steps.meta-api.outputs.labels }} + + # Indexer + + - name: Indexer image tags & labels + id: meta-indexer + uses: docker/metadata-action@v3 + with: + images: ${{ env.DOCKER_IMAGE_BASE }}-indexer + + - name: Indexer image build & push + uses: docker/build-push-action@v2 + with: + context: . + file: build/indexer/Dockerfile + push: true + cache-from: type=gha + cache-to: type=gha,mode=max + tags: ${{ steps.meta-indexer.outputs.tags }} + labels: ${{ steps.meta-indexer.outputs.labels }} + + # Metrics + + - name: Metrics image tags & labels + id: meta-metrics + uses: docker/metadata-action@v3 + with: + images: ${{ env.DOCKER_IMAGE_BASE }}-metrics + + - name: Metrics image build & push + uses: docker/build-push-action@v2 + with: + context: . + file: build/metrics/Dockerfile + push: true + cache-from: type=gha + cache-to: type=gha,mode=max + tags: ${{ steps.meta-metrics.outputs.tags }} + labels: ${{ steps.meta-metrics.outputs.labels }} \ No newline at end of file diff --git a/configs/production.yml b/configs/production.yml index 81a63c99f..72c1ca6c7 100644 --- a/configs/production.yml +++ b/configs/production.yml @@ -2,32 +2,18 @@ rpc: mainnet: uri: ${MAINNET_RPC_URI:-https://rpc.tzkt.io/mainnet} timeout: 20 - florencenet: - uri: ${TESTNET_RPC_URI:-https://rpc.tzkt.io/florencenobanet} - timeout: 20 granadanet: uri: ${NEXTNET_RPC_URI:-https://rpc.tzkt.io/granadanet} timeout: 20 - hangzhounet: - uri: https://rpc.tzkt.io/hangzhounet - timeout: 20 hangzhou2net: uri: https://rpc.tzkt.io/hangzhou2net timeout: 20 -tzkt: - mainnet: - uri: https://api.tzkt.io/v1/ - base_uri: https://tzkt.io/ - timeout: 20 - services: mainnet: mempool: https://mempool.dipdup.net/v1/graphql - florencenet: + granadanet: mempool: https://mempool.staging.dipdup.net/v1/graphql - hangzhounet: - mempool: https://mempool.staging.dipdup.net/v1/graphql hangzhou2net: mempool: https://mempool.staging.dipdup.net/v1/graphql @@ -50,12 +36,6 @@ base_url: https://better-call.dev ipfs: - ${SANDBOX_IPFS_GATEWAY:-https://ipfs.baking-bad.org} -# - https://dweb.link -# - https://ipfs.io - -domains: - edo2net: KT1KP2Yy6MNkYKkHqroGBZ7KFN5NdNfnUHHv -# mainnet: KT1GBZmSxmnKJXGMdMLbugPfLyUPmuLSMwKS api: project_name: api @@ -71,29 +51,19 @@ api: sandbox_mode: false networks: - mainnet - - florencenet - granadanet - - hangzhounet - hangzhou2net - pinata: - key: ${PINATA_KEY} - secret_key: ${PINATA_SECRET_KEY} - timeout_seconds: 10 connections: max: 50 idle: 10 - indexer: project_name: indexer sentry_enabled: true skip_delegator_blocks: false networks: mainnet: - boost: tzkt - florencenet: granadanet: - hangzhounet: hangzhou2net: connections: max: 5 @@ -115,9 +85,7 @@ scripts: secret_access_key: ${AWS_SECRET_ACCESS_KEY} networks: - mainnet - - florencenet - granadanet - - hangzhounet - hangzhou2net connections: max: 5