Skip to content

Commit

Permalink
add docker
Browse files Browse the repository at this point in the history
  • Loading branch information
kovalgek committed Dec 19, 2024
1 parent 3e7f9d9 commit 4c17e86
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 29 deletions.
21 changes: 21 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
node_modules
cache
artifacts
.DS_Store
.editorconfig
.env
.env.*

.gitignore
.gitattributes

.yarn
.husky
.prettierignore
.prettierrc

README.md
LICENSE

.dockerignore
Dockerfile*
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM node:20

WORKDIR /app

RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
python3-venv \
&& python3 -m venv /opt/venv \
&& /opt/venv/bin/pip install poetry \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

RUN corepack enable && corepack prepare [email protected] --activate

COPY . .

ENV PATH="/opt/venv/bin:/root/.foundry/bin:$PATH"

RUN curl -L https://foundry.paradigm.xyz | bash
RUN foundryup

RUN chmod +x ./initialize.sh && ./initialize.sh

CMD ["yarn", "start", "./configs/unichain_sepolia.yaml"]
17 changes: 0 additions & 17 deletions get_env_var.sh

This file was deleted.

12 changes: 0 additions & 12 deletions initialize.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,6 @@ set -e
echo 'The initialize script is about to start. It will install the dependencies as well as fetch submodules repositories and do all the necessary preliminary work'
sleep 5

source ./get_env_var.sh

export L1_CHAIN_ID="$(get_env_var "L1_CHAIN_ID")"
l1_host_value="$(get_env_var "L1_BLOCK_EXPLORER_API_HOST")"
export L1_BLOCK_EXPLORER_API_URL="https://${l1_host_value}/api"
export L1_BLOCK_EXPLORER_BROWSER_URL="$(get_env_var "L1_BLOCK_EXPLORER_BROWSER_URL")"

export L2_CHAIN_ID="$(get_env_var "L2_CHAIN_ID")"
l2_host_value="$(get_env_var "L2_BLOCK_EXPLORER_API_HOST")"
export L2_BLOCK_EXPLORER_API_URL="https://${l2_host_value}/api"
export L2_BLOCK_EXPLORER_BROWSER_URL="$(get_env_var "L2_BLOCK_EXPLORER_BROWSER_URL")"

yarn

git submodule init
Expand Down

0 comments on commit 4c17e86

Please sign in to comment.