diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8e0062e --- /dev/null +++ b/Dockerfile @@ -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 diff --git a/Dockerfile-4bytes b/Dockerfile-4bytes deleted file mode 100644 index 651cb25..0000000 --- a/Dockerfile-4bytes +++ /dev/null @@ -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 diff --git a/nginx-4bytes.conf b/nginx.conf similarity index 100% rename from nginx-4bytes.conf rename to nginx.conf diff --git a/package.json b/package.json index 7191a55..8e8031c 100644 --- a/package.json +++ b/package.json @@ -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": [ diff --git a/serve-4bytes.json b/serve-4bytes.json deleted file mode 100644 index 3d0abde..0000000 --- a/serve-4bytes.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "public": "4bytes/signatures", - "headers": [ - { - "source": "**", - "headers": [ - { - "key": "Cache-Control", - "value": "max-age=600" - } - ] - } - ], - "directoryListing": false -} \ No newline at end of file diff --git a/serve-trustwallet-assets.json b/serve-trustwallet-assets.json deleted file mode 100644 index 967698d..0000000 --- a/serve-trustwallet-assets.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "public": "trustwallet/blockchains/ethereum/assets", - "headers": [ - { - "source": "**", - "headers": [ - { - "key": "Cache-Control", - "value": "max-age=600" - } - ] - } - ], - "directoryListing": false -} \ No newline at end of file diff --git a/src/components/TokenLogo.tsx b/src/components/TokenLogo.tsx index 7905185..738de1c 100644 --- a/src/components/TokenLogo.tsx +++ b/src/components/TokenLogo.tsx @@ -15,7 +15,7 @@ const TokenLogo: React.FC = (props) => ( const InternalTokenLogo: React.FC = ({ address, name }) => { const { src } = useImage({ srcList: [ - `http://localhost:3002/${address}/logo.png`, + `http://localhost:3001/assets/${address}/logo.png`, "/eth-diamond-black.png", ], });