-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e22bc1
commit a9132fe
Showing
11 changed files
with
121 additions
and
181 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,127 +1,70 @@ | ||
version: '3' | ||
|
||
services: | ||
|
||
build-optimism: | ||
build: | ||
common: | ||
build: | ||
context: ./docker | ||
dockerfile: Dockerfile.build-optimism | ||
volumes: | ||
dockerfile: Dockerfile.op-stack | ||
volumes: | ||
- ./op-stack-deployer:/app | ||
working_dir: /app | ||
command: go run cmd/1_build_optimism/main.go | ||
networks: | ||
networks: | ||
- op-network | ||
|
||
|
||
build-optimism: | ||
extends: | ||
service: common | ||
command: go run cmd/1_build_optimism/main.go | ||
|
||
build-op-geth: | ||
build: | ||
context: ./docker | ||
dockerfile: Dockerfile.build-op-geth | ||
volumes: | ||
- ./op-stack-deployer:/app | ||
working_dir: /app | ||
extends: | ||
service: common | ||
command: go run cmd/2_build_op-geth/main.go | ||
networks: | ||
- op-network | ||
|
||
|
||
generate-keys: | ||
build: | ||
context: ./docker | ||
dockerfile: Dockerfile.generate-keys | ||
volumes: | ||
- ./op-stack-deployer:/app | ||
working_dir: /app | ||
extends: | ||
service: common | ||
command: go run cmd/3_generate_keys/main.go | ||
networks: | ||
- op-network | ||
|
||
Configure-network: | ||
extends: | ||
service: common | ||
command: go run cmd/4_configure_network/main.go | ||
|
||
deploy-l1-contracts: | ||
build: | ||
context: ./docker | ||
dockerfile: Dockerfile.deploy-l1-contracts | ||
volumes: | ||
- ./op-stack-deployer:/app | ||
working_dir: /app | ||
extends: | ||
service: common | ||
command: go run cmd/5_deploy_L1_contracts/main.go | ||
networks: | ||
- op-network | ||
|
||
l2-config: | ||
build: | ||
context: ./docker | ||
dockerfile: Dockerfile.l2-config | ||
volumes: | ||
- ./op-stack-deployer:/app | ||
working_dir: /app | ||
extends: | ||
service: common | ||
command: sudo go run cmd/6_L2_config/main.go | ||
networks: | ||
- op-network | ||
|
||
init-op-geth: | ||
build: | ||
context: ./docker | ||
dockerfile: Dockerfile.init-op-geth | ||
volumes: | ||
- ./op-stack-deployer:/app | ||
working_dir: /app | ||
extends: | ||
service: common | ||
command: go run cmd/7_Initialize_op-geth/main.go | ||
networks: | ||
- op-network | ||
|
||
run-op-geth: | ||
build: | ||
context: ./docker | ||
dockerfile: Dockerfile.run-op-geth | ||
volumes: | ||
- ./op-stack-deployer:/app | ||
working_dir: /app | ||
extends: | ||
service: common | ||
command: go run cmd/8_run_op-geth/main.go | ||
networks: | ||
- op-network | ||
|
||
run-op-node: | ||
build: | ||
context: ./docker | ||
dockerfile: Dockerfile.run-op-node | ||
volumes: | ||
- ./op-stack-deployer:/app | ||
working_dir: /app | ||
command: go run cmd/9_run_op-node/main.go | ||
networks: | ||
- op-network | ||
extends: | ||
service: common | ||
command: go run cmd/9_run_op-node/main.go | ||
|
||
run-op-batcher: | ||
build: | ||
context: ./docker | ||
dockerfile: Dockerfile.run-op-batcher | ||
volumes: | ||
- ./op-stack-deployer:/app | ||
working_dir: /app | ||
command: go run cmd/10_run_op-batcher/main.go | ||
networks: | ||
- op-network | ||
extends: | ||
service: common | ||
command: go run cmd/10_run_op-batcher/main.go | ||
|
||
run_op-proposer: | ||
build: | ||
context: ./docker | ||
dockerfile: Dockerfile.run-op-proposer | ||
volumes: | ||
- ./op-stack-deployer:/app | ||
working_dir: /app | ||
run-op-proposer: | ||
extends: | ||
service: common | ||
command: go run cmd/11_run_op-proposer/main.go | ||
networks: | ||
- op-network | ||
|
||
get-rollup-address: | ||
build: | ||
context: ./docker | ||
dockerfile: Dockerfile.get-rollup-address | ||
volumes: | ||
- ./op-stack-deployer:/app | ||
working_dir: /app | ||
command: go run cmd/12_get_rollup_address/main.go | ||
networks: | ||
- op-network | ||
|
||
networks: | ||
op-network: | ||
op-network: |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,73 @@ | ||
# Common stage for shared instructions | ||
FROM golang:alpine AS common | ||
|
||
WORKDIR /app | ||
|
||
COPY Dockerfile.op-stack /app/ | ||
COPY scripts/entrypoint-build-optimism.sh /app/ | ||
COPY cmd /app/ | ||
COPY go.mod /app/ | ||
COPY go.sum /app/ | ||
|
||
RUN apk update && apk add --no-cache git nodejs npm make jq direnv | ||
|
||
# Stage 1: Build Optimism | ||
FROM common AS build-optimism | ||
|
||
RUN chmod +x /app/entrypoint-build-optimism.sh | ||
|
||
CMD ["/app/entrypoint-build-optimism.sh"] | ||
|
||
# Stage 2: Build op-geth | ||
FROM common AS build-op-geth | ||
|
||
COPY scripts/entrypoint-build-op-geth.sh /app/ | ||
|
||
RUN chmod +x /app/entrypoint-build-op-geth.sh | ||
|
||
CMD ["/app/entrypoint-build-op-geth.sh"] | ||
|
||
# Stage 3: Generate Keys | ||
FROM common AS generate-keys | ||
|
||
COPY scripts/entrypoint-generate-keys.sh /app/ | ||
|
||
RUN chmod +x /app/entrypoint-generate-keys.sh | ||
|
||
CMD ["/app/entrypoint-generate-keys.sh"] | ||
|
||
# Stage 4: Configure Network | ||
FROM common AS configure-network | ||
|
||
COPY scripts/entrypoint-configure-network.sh /app/ | ||
|
||
RUN chmod +x /app/entrypoint-configure-network.sh | ||
|
||
CMD ["/app/entrypoint-configure-network.sh"] | ||
|
||
# Stage 5: Deploy L1 Contracts | ||
FROM common AS deploy-l1-contracts | ||
|
||
COPY scripts/entrypoint-deploy-l1-contracts.sh /app/ | ||
|
||
RUN chmod +x /app/entrypoint-deploy-l1-contracts.sh | ||
|
||
CMD ["/app/entrypoint-deploy-l1-contracts.sh"] | ||
|
||
# Stage 6: Configure L2 | ||
FROM common AS configure-l2 | ||
|
||
COPY scripts/entrypoint-l2-config.sh /app/ | ||
|
||
RUN chmod +x /app/entrypoint-l2-config.sh | ||
|
||
CMD ["/app/entrypoint-l2-config.sh"] | ||
|
||
# Stage 7: Initialize op-geth | ||
FROM common AS init-op-geth | ||
|
||
COPY scripts/entrypoint-init-op-geth.sh /app/ | ||
|
||
RUN chmod +x /app/entrypoint-init-op-geth.sh | ||
|
||
CMD ["/app/entrypoint-init-op-geth.sh"] |
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 @@ | ||
#!/bin/sh | ||
|
||
while [ ! -f /app/previous_step_done ]; do | ||
sleep 1 | ||
done | ||
|
||
go run cmd/4_configure_network/main.go | ||
|
||
touch /app/configure_network_done |
This file was deleted.
Oops, something went wrong.