Merge trustwallet assets to the same docker image

This commit is contained in:
Willian Mitsuda 2021-07-07 16:59:49 -03:00
parent 97e542f51e
commit cf581e1ab5
7 changed files with 8 additions and 38 deletions

4
Dockerfile Normal file
View File

@ -0,0 +1,4 @@
FROM nginx:1.21.1-alpine
COPY 4bytes/signatures /usr/share/nginx/html/signatures/
COPY trustwallet/blockchains/ethereum/assets /usr/share/nginx/html/assets/
COPY nginx.conf /etc/nginx/conf.d/default.conf

View File

@ -1,3 +0,0 @@
FROM nginx:1.21.1-alpine
COPY 4bytes/signatures /usr/share/nginx/html/signatures/
COPY nginx-4bytes.conf /etc/nginx/conf.d/default.conf

View File

@ -42,11 +42,10 @@
"build": "craco build",
"test": "craco test",
"eject": "react-scripts eject",
"start-4bytes": "docker run --rm -p 3001:80 --name otterscan-4bytes -d otterscan/4bytes",
"stop-4bytes": "docker stop otterscan-4bytes",
"serve-trustwallet-assets": "serve -p 3002 -C -c serve-trustwallet-assets.json",
"start-docker": "docker run --rm -p 3001:80 --name otterscan -d otterscan",
"stop-docker": "docker stop otterscan",
"serve": "serve -s build",
"build-docker-4bytes": "docker build -t otterscan/4bytes -f Dockerfile-4bytes ."
"build-docker": "docker build -t otterscan -f Dockerfile ."
},
"eslintConfig": {
"extends": [

View File

@ -1,15 +0,0 @@
{
"public": "4bytes/signatures",
"headers": [
{
"source": "**",
"headers": [
{
"key": "Cache-Control",
"value": "max-age=600"
}
]
}
],
"directoryListing": false
}

View File

@ -1,15 +0,0 @@
{
"public": "trustwallet/blockchains/ethereum/assets",
"headers": [
{
"source": "**",
"headers": [
{
"key": "Cache-Control",
"value": "max-age=600"
}
]
}
],
"directoryListing": false
}

View File

@ -15,7 +15,7 @@ const TokenLogo: React.FC<TokenLogoProps> = (props) => (
const InternalTokenLogo: React.FC<TokenLogoProps> = ({ address, name }) => {
const { src } = useImage({
srcList: [
`http://localhost:3002/${address}/logo.png`,
`http://localhost:3001/assets/${address}/logo.png`,
"/eth-diamond-black.png",
],
});