Skip to content

Commit

Permalink
update docker stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyke-bot committed Jan 26, 2024
1 parent f9091bf commit fef4c2b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 29 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
/target

/run.sh
data
redis-dataflamegraph.svg
/redis-data

/*flamegraph.svg

3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ RUN apt update \
RUN update-ca-certificates

COPY --from=builder /app/target/release/cached-eth-rpc /app/cached-eth-rpc
COPY ./docker-entrypoint.sh /app/docker-entrypoint.sh

ENV ENDPOINTS="eth-chain=https://rpc.ankr.com/eth,bsc-chain=https://rpc.ankr.com/bsc"

EXPOSE 8124
CMD ["/app/docker-entrypoint.sh", "/app/cached-eth-rpc"]
ENTRYPOINT [ "/app/cached-eth-rpc" ]
30 changes: 21 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
version: "3"
services:
docker-redis:
image: redis:alpine
ports:
- "6379:6379"
volumes:
- ./redis-data:/data
rpc:
image: ghcr.io/fuzzland/cached-eth-rpc:latest
ports:
- "8124:8124"
environment:
- ENDPOINTS=eth-chain=https://rpc.ankr.com/eth,bsc-chain=https://rpc.ankr.com/bsc
- REDIS_URL=redis://docker-redis:6379
command:
- --port=8124
- --bind=0.0.0.0
- --endpoint=eth=https://rpc.ankr.com/eth
- --endpoint=bsc=https://rpc.ankr.com/bsc
- --redis-url=redis://docker-redis:6379

redis:
image: redis:alpine
ports:
- "6379:6379"
volumes:
- redis-data:/data

volumes:
redis-data:
driver: local
driver_opts:
type: none
device: ./redis-data
o: bind
16 changes: 0 additions & 16 deletions docker-entrypoint.sh

This file was deleted.

0 comments on commit fef4c2b

Please sign in to comment.