-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Runs the process async without blocking the event loop. Expected to improve the current high server response times. Also adds Docker container to debug the linux-amd64 binaries (our server default) on host machines with different platforms.
- Loading branch information
Showing
4 changed files
with
102 additions
and
22 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
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,44 @@ | ||
# Runs the server in a linux-amd64 container with debug port exposed | ||
# Used in debugging solidity linux-amd64 binary executables | ||
version: "3.7" | ||
x-project-repository-mount: &project-repository-mount | ||
type: bind | ||
source: $REPOSITORY_PATH | ||
|
||
x-project-base: &project-base | ||
env_file: | ||
- .env | ||
restart: always | ||
networks: | ||
- source-verify | ||
|
||
networks: | ||
source-verify: | ||
|
||
services: | ||
server: | ||
<<: *project-base | ||
# image: ethereum/source-verify:server-${TAG} | ||
build: | ||
context: ../ | ||
dockerfile: src/Dockerfile.server.debug | ||
container_name: server-${TAG} | ||
platform: linux/amd64 | ||
ports: | ||
- "${SERVER_EXTERNAL_PORT}:${SERVER_PORT}" | ||
- "9229:9229" # Debug port | ||
volumes: | ||
- ../:/home/app | ||
- <<: *project-repository-mount | ||
target: /home/data/repository | ||
- type: bind | ||
source: $SOLC_REPO_HOST | ||
target: $SOLC_REPO | ||
- type: bind | ||
source: $SOLJSON_REPO_HOST | ||
target: $SOLJSON_REPO | ||
healthcheck: | ||
test: ["CMD", "curl", "-f", "http://localhost:${SERVER_PORT}/health"] | ||
interval: 30s | ||
timeout: 10s | ||
retries: 10 |
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,9 @@ | ||
# Runs the server in a linux-amd64 container with debug port exposed | ||
# Used in debugging solidity linux-amd64 binary executables | ||
FROM node:16 | ||
WORKDIR /home/app | ||
|
||
# Install puppeteer dependencies. | ||
RUN apt-get update && apt-get -y install xvfb gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget | ||
|
||
CMD ["node", "--inspect=0.0.0.0:9229", "./dist/server/server.js"] |