Skip to content

Commit

Permalink
Apply new configuration for upstream Sourcify images
Browse files Browse the repository at this point in the history
Signed-off-by: Luis Mastrangelo <luis@swirldslabs.com>
  • Loading branch information
acuarica committed Apr 25, 2024
1 parent b0064e7 commit 45d0852
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 15 deletions.
2 changes: 1 addition & 1 deletion environments/.env.docker.hedera
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SERVER_CREATE2_VERIFICATION=false
## h5ai-nginx/select-contract-form/public/config.json)
## - the 'server' uses the REPOSITORY_SERVER_URL env variable to return links to the various
## contract files.
#SERVER_URL=http://localhost:5002
SERVER_URL=http://localhost:5002
REPOSITORY_SERVER_URL=http://localhost:10000

# Docker config
Expand Down
3 changes: 3 additions & 0 deletions environments/.env.sourcify.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

NODE_ENV=development

23 changes: 11 additions & 12 deletions environments/docker-compose-hedera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,30 @@ services:
container_name: repository-${TAG}
volumes:
- type: bind
source: $REPOSITORY_PATH_HOST
target: $REPOSITORY_PATH
source: ../data
target: /data
read_only: true
- type: bind
source: ./docker-config.json
target: /redirects/config.json
ports:
- "${REPOSITORY_SERVER_EXTERNAL_PORT}:80"

server:
<<: *project-base
image: ghcr.io/ethereum/sourcify/server:${TAG}
container_name: server-${TAG}
environment:
- NODE_ENV=development
ports:
- "${SERVER_EXTERNAL_PORT}:${SERVER_PORT}"
volumes:
- type: bind
source: $REPOSITORY_PATH_HOST
target: $REPOSITORY_PATH
source: ./servers.yaml
target: /home/app/services/server/dist/servers.yaml
- type: bind
source: $SOLC_REPO_HOST
target: $SOLC_REPO
source: ./sourcify-chains.json
target: /home/app/services/server/dist/sourcify-chains.json
- type: bind
source: $SOLJSON_REPO_HOST
target: $SOLJSON_REPO
source: ../data
target: /tmp/sourcify/repository
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${SERVER_PORT}/health"]
interval: 30s
Expand All @@ -62,7 +61,7 @@ services:
retries: 10
volumes:
- type: bind
source: ./docker-config.json
source: ./ui-config.json
target: /usr/share/nginx/html/config.json
ports:
- "${UI_EXTERNAL_PORT}:80"
8 changes: 8 additions & 0 deletions environments/servers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- description: The current REST API server
url: ""
- description: The production REST API server
url: "https://server-verify.hashscan.io"
- description: The staging REST API server
url: "https://server-sourcify.hedera-devops.com"
- description: Local development server address on default port 5555
url: "http://localhost:5555"
21 changes: 21 additions & 0 deletions environments/sourcify-chains.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"295": {
"sourcifyName": "Hedera Mainnet",
"supported": true
},
"296": {
"sourcifyName": "Hedera Testnet",
"supported": true
},
"297": {
"sourcifyName": "Hedera Previewnet",
"supported": true
},
"298": {
"sourcifyName": "Hedera Localnet",
"supported": true,
"rpc": [
"http://host.docker.internal:7546"
]
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"SERVER_URL": "http://localhost:5002",
"SERVER_URL": "http://localhost:5555",
"REPOSITORY_SERVER_URL": "http://localhost:10000",
"EXPLORER_URL": "http://localhost:8080",
"BRAND_PRODUCT_LOGO_URL": "",
Expand All @@ -10,4 +10,4 @@
"JSON_IMPORT": false,
"OPEN_IN_REMIX": false,
"CREATE2_VERIFICATION": false
}
}

0 comments on commit 45d0852

Please sign in to comment.