Skip to content

Commit

Permalink
fix: Update env variables management at docker level
Browse files Browse the repository at this point in the history
  • Loading branch information
AntiD2ta committed Jan 17, 2024
1 parent 827af89 commit 5242819
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ jobs:
docker buildx build --platform=linux/amd64,linux/arm64 \
-f ${{ github.event.inputs.dockerfile || 'Dockerfile' }} \
-t "nethermind/${{ github.event.inputs.image-name }}:$tag" \
--build-arg BUILD_FETCH_INTERVAL=${{ github.event.inputs.fetch-interval }} \
--build-arg BUILD_API_URL=${{ github.event.inputs.api-url }} \
. --push
docker buildx build --platform=linux/amd64,linux/arm64 \
-f ${{ github.event.inputs.dockerfile || 'Dockerfile' }} \
-t "nethermind/${{ github.event.inputs.image-name }}:latest" \
. --push
8 changes: 2 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,9 @@ RUN pip install --no-cache-dir -r requirements.txt
# Make port 9600 available to the world outside this container
EXPOSE 9600

# Define arguments for build-time configuration
ARG BUILD_FETCH_INTERVAL=60
ARG BUILD_API_URL=https://blobs-goerli.eigenda.xyz/api/trpc/blobs.getBlobs

# Define environment variable
ENV FETCH_INTERVAL=${BUILD_FETCH_INTERVAL}
ENV API_URL=${BUILD_API_URL}
ENV FETCH_INTERVAL=60
ENV API_URL=https://blobs-goerli.eigenda.xyz/api/trpc/blobs.getBlobs

# Run main.py when the container launches
CMD ["python", "./main.py"]

0 comments on commit 5242819

Please sign in to comment.