Bootstrapped with Create React App.
Set the environment variables in .env.development depending on your settings.
The variables REACT_APP... will get injected into the build and are available at runtime.
Install with npm install and run the development server with npm start.
Before build you need to provide the environment variables in .env.production or .env. Check out CRA docs on env vars.
Build with
npm run build
Resulting static assets will be stored at build/ and ready to be served.
The Dockerfile installs, builds and serves the project on a minimal nginx container.
Again, don't forget to provide the environment variables in .env.production or .env (CRA docs on env vars).
Build with
docker build -t sourcify-ui .
Run with
docker run -p 80:80 sourcify-ui
The Docker image is published on Github Container Registry. You can run it with
docker run -p 80:80 ghcr.io/ethereum/sourcify/ui:latest
However pleases note that the values in the .env files are injected on the build time so you won't be able to provide custom values for the environment variables:
REACT_APP_SERVER_URL=https://sourcify.dev/server
REACT_APP_REPOSITORY_SERVER_URL=https://repo.sourcify.dev
# Use DNSLink for IPNS
REACT_APP_IPNS=repo.sourcify.dev
REACT_APP_TAG=masterIf you want to provide custom values for the environment variables you need to build the image yourself.
A workaround could be running a custom find and replace on the files before running the image:
find /usr/share/nginx/html/ -type f -exec sed -i 's#docs.sourcify.dev#yourcustomlink.com#g' {} \;;This repository was initially under ethereum/sourcify monorepo and spun out as it's own repo on 19.07.2024.