-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #186 from 0xPolygonHermez/feature/CDK-45
Added deployment output files to the image during build
- Loading branch information
Showing
11 changed files
with
77 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
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,19 @@ | ||
FROM ethereum/client-go:v1.12.0 | ||
|
||
RUN apk update | ||
RUN apk add --no-cache nginx | ||
|
||
RUN nginx -v | ||
|
||
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh | ||
COPY docker/nginx.conf /etc/nginx/nginx.conf | ||
|
||
EXPOSE 8545 | ||
EXPOSE 9545 | ||
|
||
COPY docker/gethData / | ||
COPY docker/deploymentOutput /config/ | ||
|
||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] | ||
|
||
CMD ["--rpc.allow-unprotected-txs", "--http", "--http.addr", "0.0.0.0", "--http.corsdomain", "*", "--http.vhosts", "*", "--ws", "--ws.origins", "*", "--ws.addr", "0.0.0.0", "--dev", "--dev.period", "1", "--datadir", "/geth_data"] |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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,7 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -xeuo | ||
|
||
nginx -g 'daemon off;' & | ||
|
||
geth "$@" |
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,35 @@ | ||
user nginx; | ||
worker_processes auto; | ||
error_log /var/log/nginx/error.log; | ||
pid /run/nginx.pid; | ||
|
||
include /usr/share/nginx/modules/*.conf; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
access_log /var/log/nginx/access.log main; | ||
|
||
include /etc/nginx/mime.types; | ||
default_type application/json; | ||
|
||
server { | ||
listen 9545 default_server; | ||
listen [::]:9545 default_server; | ||
|
||
server_name _; | ||
root /config; | ||
|
||
location / { | ||
alias /config/; | ||
default_type application/json; | ||
index deploy_output.json; | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
#!/bin/bash | ||
sudo rm -rf docker/gethData/geth_data | ||
DEV_PERIOD=1 docker-compose -f docker/docker-compose.geth.yml up -d geth | ||
DEV_PERIOD=1 docker-compose -f docker/docker-compose.yml up -d geth | ||
sleep 5 | ||
node docker/scripts/fund-accounts.js | ||
cp docker/scripts/testV1ToV2/deploy_parameters_docker.json deployment/testV1ToV2/deploy_parameters.json | ||
npm run deploy:testnet:testV1ToV2:localhost | ||
mkdir docker/deploymentOutput | ||
mv deployment/testV1ToV2/deploy_output.json docker/deploymentOutput | ||
mv deployment/testV1ToV2/genesis.json docker/deploymentOutput | ||
DEV_PERIOD=1 docker-compose -f docker/docker-compose.geth.yml down | ||
sudo docker build -t hermeznetwork/geth-zkevm-contracts -f docker/Dockerfile.geth . | ||
DEV_PERIOD=1 docker-compose -f docker/docker-compose.yml down | ||
docker build -t hermeznetwork/geth-zkevm-contracts -f docker/Dockerfile . | ||
# Let it readable for the multiplatform build coming later! | ||
sudo chmod -R go+rxw docker/gethData |
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
#!/bin/bash | ||
sudo rm -rf docker/gethData/geth_data | ||
DEV_PERIOD=1 docker compose -f docker/docker-compose.geth.yml up -d geth | ||
DEV_PERIOD=1 docker compose -f docker/docker-compose.yml up -d geth | ||
sleep 5 | ||
node docker/scripts/fund-accounts.js | ||
cp docker/scripts/testV1ToV2/deploy_parameters_docker.json deployment/testV1ToV2/deploy_parameters.json | ||
npm run deploy:testnet:testV1ToV2:localhost | ||
mkdir docker/deploymentOutput | ||
mv deployment/testV1ToV2/deploy_output.json docker/deploymentOutput | ||
mv deployment/testV1ToV2/genesis.json docker/deploymentOutput | ||
DEV_PERIOD=1 docker compose -f docker/docker-compose.geth.yml down | ||
sudo docker build -t hermeznetwork/geth-zkevm-contracts -f docker/Dockerfile.geth . | ||
DEV_PERIOD=1 docker compose -f docker/docker-compose.yml down | ||
docker build -t hermeznetwork/geth-zkevm-contracts -f docker/Dockerfile . | ||
# Let it readable for the multiplatform build coming later! | ||
sudo chmod -R go+rxw docker/gethData |
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