Skip to content

Commit

Permalink
feat(docker): add docker and docker-compose (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
hel-kame authored Apr 19, 2024
1 parent a2e18cb commit 65cc66e
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ git # Deoxys Changelog

## Next release

- feat(docker): add dockerfile and docker-compose
- fix: fix implementation `get_storage_at()` for `BlockifierStateAdapter`
- fix(sync): Fix end condition of the l2 sync
- fix(rpc): fix chain id method for mainnet
Expand Down
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM rust:slim-buster

RUN apt-get -y update; \
apt-get install -y --no-install-recommends \
libssl-dev make clang-11 g++ llvm protobuf-compiler libasound2-dev \
pkg-config libz-dev zstd git build-essential; \
apt-get autoremove -y; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*

EXPOSE 9944

COPY . .

RUN cargo build --profile=production

ENTRYPOINT ["./target/production/deoxys"]
28 changes: 28 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: "3.8"

services:
deoxys:
build:
context: ./deoxys/
dockerfile: Dockerfile
container_name: deoxys
restart: unless-stopped
ports:
- "9944:9944"
volumes:
- /var/lib/deoxys:/var/lib/deoxys
command:
[
"--deoxys",
"--rpc-port",
"9944",
"--network",
"main",
"--rpc-external",
"--rpc-cors",
"*",
"--l1-endpoint",
"${ETHEREUM_API_URL}",
"--base-path",
"/var/lib/deoxys",
]

0 comments on commit 65cc66e

Please sign in to comment.