forked from forbole/big-dipper-2.0-cosmos
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from CudoVentures/cudos-dev
Merge cudos-dev branch with master
- Loading branch information
Showing
221 changed files
with
16,252 additions
and
24,069 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# This is a sample .env file for use in local development. | ||
# Duplicate this file as .env in the root of the project | ||
# and update the environment variables to match your | ||
# desired config | ||
# | ||
# See the README for full descriptions of each of the | ||
# available configurations. | ||
|
||
NEXT_PUBLIC_GRAPHQL_URL=http://localhost:8080/v1/graphql | ||
NEXT_PUBLIC_GRAPHQL_WS=ws://localhost:8080/v1/graphql | ||
NODE_ENV=development | ||
PORT=3000 | ||
NEXT_PUBLIC_URL=http://localhost:3000 | ||
NEXT_PUBLIC_RPC_WEBSOCKET=http://localhost:26657/websocket | ||
NEXT_PUBLIC_CHAIN_TYPE=testnet |
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,90 @@ | ||
name: Docker-Production | ||
|
||
on: | ||
push: | ||
tags: | ||
- desmos-morpheus-apollo-1-v* | ||
|
||
jobs: | ||
Build-and-Publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Prepare tags | ||
id: prep | ||
run: | | ||
DOCKER_IMAGE=forbole/big-dipper-2.0-cosmos | ||
VERSION=edge | ||
if [[ $GITHUB_REF == refs/tags/* ]]; then | ||
VERSION=${GITHUB_REF#refs/tags/} | ||
fi | ||
TAGS="${DOCKER_IMAGE}:${VERSION}" | ||
echo ::set-output name=version::${VERSION} | ||
echo ::set-output name=tags::${TAGS} | ||
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ') | ||
- name: Prepare docker build env | ||
id: dockerPrep | ||
run: | | ||
NEXT_PUBLIC_GRAPHQL_URL= | ||
NEXT_PUBLIC_GRAPHQL_WS= | ||
NEXT_PUBLIC_URL= | ||
NEXT_PUBLIC_RPC_WEBSOCKET= | ||
NEXT_PUBLIC_CHAIN_TYPE= | ||
NODE_ENV="production" | ||
PORT=3000 | ||
if [[ $GITHUB_REF == refs/tags/desmos-morpheus-apollo-1* ]]; then | ||
NEXT_PUBLIC_GRAPHQL_URL="https://gql.morpheus.desmos.network/v1/graphql" | ||
NEXT_PUBLIC_GRAPHQL_WS="wss://gql.morpheus.desmos.network/v1/graphql" | ||
NEXT_PUBLIC_URL="https://morpheus.desmos.network" | ||
NEXT_PUBLIC_RPC_WEBSOCKET="wss://rpc.morpheus.desmos.network/websocket" | ||
NEXT_PUBLIC_CHAIN_TYPE="testnet" | ||
fi | ||
echo ::set-output name=NEXT_PUBLIC_GRAPHQL_URL::${NEXT_PUBLIC_GRAPHQL_URL} | ||
echo ::set-output name=NEXT_PUBLIC_GRAPHQL_WS::${NEXT_PUBLIC_GRAPHQL_WS} | ||
echo ::set-output name=NEXT_PUBLIC_URL::${NEXT_PUBLIC_URL} | ||
echo ::set-output name=NEXT_PUBLIC_RPC_WEBSOCKET::${NEXT_PUBLIC_RPC_WEBSOCKET} | ||
echo ::set-output name=NEXT_PUBLIC_CHAIN_TYPE::${NEXT_PUBLIC_CHAIN_TYPE} | ||
echo ::set-output name=NODE_ENV::${NODE_ENV} | ||
echo ::set-output name=PORT::${PORT} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: ${{ steps.prep.outputs.tags }} | ||
build-args: | | ||
"NEXT_PUBLIC_GRAPHQL_URL=${{ steps.dockerPrep.outputs.NEXT_PUBLIC_GRAPHQL_URL }}" | ||
"NEXT_PUBLIC_GRAPHQL_WS=${{ steps.dockerPrep.outputs.NEXT_PUBLIC_GRAPHQL_WS }}" | ||
"NEXT_PUBLIC_URL=${{ steps.dockerPrep.outputs.NEXT_PUBLIC_URL }}" | ||
"NEXT_PUBLIC_RPC_WEBSOCKET=${{ steps.dockerPrep.outputs.NEXT_PUBLIC_RPC_WEBSOCKET }}" | ||
"NEXT_PUBLIC_CHAIN_TYPE=${{ steps.dockerPrep.outputs.NEXT_PUBLIC_CHAIN_TYPE }}" | ||
"NODE_ENV=${{ steps.dockerPrep.outputs.NODE_ENV }}" | ||
"PORT=${{ steps.dockerPrep.outputs.PORT }}" | ||
labels: | | ||
org.opencontainers.image.source=${{ github.event.repository.html_url }} | ||
org.opencontainers.image.created=${{ steps.prep.outputs.created }} | ||
org.opencontainers.image.revision=${{ github.sha }} | ||
- name: Deploy to Akash 🌐 | ||
env: | ||
DESMOS_AKASH_WEBHOOK_URL: ${{ secrets.DESMOS_AKASH_WEBHOOK_URL }} | ||
AKASH_WEBHOOK_SECRET: ${{ secrets.AKASH_WEBHOOK_SECRET }} | ||
run: | | ||
BRANCH=${GITHUB_REF} | ||
WEBHOOK_URL='' | ||
if [[ $GITHUB_REF == refs/tags/desmos-morpheus-apollo-1* ]]; then | ||
echo 'Deploying to Desmos morpheus-apollo-1' | ||
WEBHOOK_URL=$DESMOS_AKASH_WEBHOOK_URL | ||
fi | ||
curl -i -X POST -H "Content-Type: application/json" -d '{"parameters":{"tag": "${{ steps.prep.outputs.version }}"}}' -k $WEBHOOK_URL -u "deploy:$AKASH_WEBHOOK_SECRET" | ||
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,69 @@ | ||
name: Docker-Staging | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- chains/desmos | ||
|
||
jobs: | ||
Build-and-Publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Prepare tags | ||
id: prep | ||
run: | | ||
BRANCH=${GITHUB_REF#refs/heads/} | ||
if [[ $GITHUB_REF == refs/heads/chains/desmos ]]; then | ||
BRANCH="desmos" | ||
elif [[ $GITHUB_REF == refs/pull/* ]]; then | ||
BRANCH="build-test" | ||
fi | ||
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ') | ||
echo ::set-output name=branch::${BRANCH} | ||
- name: Prepare docker build env | ||
id: dockerPrep | ||
run: | | ||
NEXT_PUBLIC_GRAPHQL_URL="https://gql.morpheus.desmos.network/v1/graphql" | ||
NEXT_PUBLIC_GRAPHQL_WS="wss://gql.morpheus.desmos.network/v1/graphql" | ||
NEXT_PUBLIC_URL="https://morpheus.desmos.network" | ||
NEXT_PUBLIC_RPC_WEBSOCKET="wss://rpc.morpheus.desmos.network/websocket" | ||
NEXT_PUBLIC_CHAIN_TYPE="mainnet" | ||
NODE_ENV="production" | ||
PORT=3000 | ||
echo ::set-output name=NEXT_PUBLIC_GRAPHQL_URL::${NEXT_PUBLIC_GRAPHQL_URL} | ||
echo ::set-output name=NEXT_PUBLIC_GRAPHQL_WS::${NEXT_PUBLIC_GRAPHQL_WS} | ||
echo ::set-output name=NEXT_PUBLIC_URL::${NEXT_PUBLIC_URL} | ||
echo ::set-output name=NEXT_PUBLIC_RPC_WEBSOCKET::${NEXT_PUBLIC_RPC_WEBSOCKET} | ||
echo ::set-output name=NEXT_PUBLIC_CHAIN_TYPE::${NEXT_PUBLIC_CHAIN_TYPE} | ||
echo ::set-output name=NODE_ENV::${NODE_ENV} | ||
echo ::set-output name=PORT::${PORT} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to DockerHub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: ${{ github.event_name != 'pull_request' }} | ||
build-args: | | ||
"NEXT_PUBLIC_GRAPHQL_URL=${{ steps.dockerPrep.outputs.NEXT_PUBLIC_GRAPHQL_URL }}" | ||
"NEXT_PUBLIC_GRAPHQL_WS=${{ steps.dockerPrep.outputs.NEXT_PUBLIC_GRAPHQL_WS }}" | ||
"NEXT_PUBLIC_URL=${{ steps.dockerPrep.outputs.NEXT_PUBLIC_URL }}" | ||
"NEXT_PUBLIC_RPC_WEBSOCKET=${{ steps.dockerPrep.outputs.NEXT_PUBLIC_RPC_WEBSOCKET }}" | ||
"NEXT_PUBLIC_CHAIN_TYPE=${{ steps.dockerPrep.outputs.NEXT_PUBLIC_CHAIN_TYPE }}" | ||
"NODE_ENV=${{ steps.dockerPrep.outputs.NODE_ENV }}" | ||
"PORT=${{ steps.dockerPrep.outputs.PORT }}" | ||
tags: "forbole/big-dipper-2.0-cosmos:${{ steps.prep.outputs.branch }}-staging" | ||
labels: | | ||
org.opencontainers.image.source=${{ github.event.repository.html_url }} | ||
org.opencontainers.image.created=${{ steps.prep.outputs.created }} | ||
org.opencontainers.image.revision=${{ github.sha }} |
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 |
---|---|---|
|
@@ -31,3 +31,5 @@ jobs: | |
run: npm ci | ||
- name: Run build check | ||
run: npm run build | ||
env: | ||
NODE_OPTIONS: "--max-old-space-size=8192" |
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
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
Oops, something went wrong.