-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged TFL station-assets latest changes
- Loading branch information
Showing
65 changed files
with
1,177 additions
and
550 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,55 @@ | ||
name: Docker Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
# https://docs.docker.com/build/ci/github-actions/multi-platform/ | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
# Workaround: https://github.com/docker/build-push-action/issues/461 | ||
- name: Setup Docker buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to the github container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
images: | | ||
ghcr.io/${{ github.repository }} | ||
tags: | | ||
type=sha | ||
type=semver,pattern={{tag}} | ||
type=semver,pattern={{version}} | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
- name: Build docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
push: ${{ github.event_name != 'pull_request' }} | ||
file: Dockerfile | ||
tags: ${{ env.DOCKER_METADATA_OUTPUT_TAGS }} | ||
labels: ${{ env.DOCKER_METADATA_OUTPUT_LABELS }} |
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 |
---|---|---|
|
@@ -106,6 +106,9 @@ dist | |
# build folder | ||
build | ||
|
||
# public folder | ||
public | ||
|
||
# OSX files | ||
.DS_Store | ||
|
||
|
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,52 @@ | ||
FROM node:18 as assets-builder | ||
|
||
WORKDIR /assets | ||
|
||
RUN set -eux && \ | ||
git clone https://github.com/terra-money/assets.git ./ | ||
|
||
RUN set -eux && \ | ||
npm install && \ | ||
npm run build | ||
|
||
############################################################################### | ||
FROM node:18 as station-assets-builder | ||
|
||
ARG CF_PAGES_URL="https://station-assets.pages.dev" | ||
ARG FND_BASE_URL="https://finder.station.money" | ||
ENV CF_PAGES_URL=${CF_PAGES_URL} | ||
ENV FND_BASE_URL=${FND_BASE_URL} | ||
|
||
WORKDIR /assets | ||
|
||
COPY . . | ||
|
||
RUN set -eux && \ | ||
npm install && \ | ||
npm run build | ||
|
||
############################################################################### | ||
FROM node:18-alpine | ||
|
||
WORKDIR /assets | ||
|
||
COPY ./serve.js ./serve.js | ||
COPY --from=station-assets-builder /assets/build/* ./public/ | ||
COPY --from=assets-builder /assets/station/*json ./public/station/ | ||
COPY --from=assets-builder /assets/ibc/*json ./public/ibc/ | ||
COPY --from=assets-builder /assets/cw20/*json ./public/cw20/ | ||
COPY --from=assets-builder /assets/extensions.json ./public/extensions.json | ||
|
||
RUN set -eux && \ | ||
npm init -y && \ | ||
npm install cors express && \ | ||
mkdir -p /assets/public/img && \ | ||
cd /assets/public/img && \ | ||
ln -s ../coins coins && \ | ||
ln -s ../chains chains | ||
|
||
# Expose port 3001 | ||
EXPOSE 3001 | ||
|
||
# Start the Express app | ||
CMD [ "node", "serve.js" ] |
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,35 @@ | ||
module.exports = { | ||
chainID: 'archway-1', | ||
lcd: 'https://api.mainnet.archway.io', | ||
gasAdjustment: 1.75, | ||
gasPrices: { aarch: 1500000000000 }, | ||
prefix: 'archway', | ||
coinType: '118', | ||
baseAsset: 'aarch', | ||
name: 'Archway', | ||
icon: process.env.CF_PAGES_URL + '/img/chains/Archway.png', | ||
ibc: {}, | ||
channels: { | ||
'axelar-dojo-1': 'channel-13', | ||
'cosmoshub-4': 'channel-0', | ||
'kaiyo-1': 'channel-11', | ||
'osmosis-1': 'channel-1', | ||
'juno-1': 'channel-15', | ||
'crescent-1': 'channel-6', | ||
}, | ||
explorer: { | ||
address: 'https://www.mintscan.io/archway/account/{}', | ||
tx: 'https://www.mintscan.io/archway/txs/{}', | ||
validator: 'https://www.mintscan.io/archway/validators/{}', | ||
block: 'https://www.mintscan.io/archway/blocks/id/{}', | ||
}, | ||
tokens: [ | ||
{ | ||
token: 'aarch', | ||
symbol: 'ARCH', | ||
name: 'Archway', | ||
icon: process.env.CF_PAGES_URL + '/img/coins/Aarch.png', | ||
decimals: 18, | ||
}, | ||
], | ||
} |
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.