switch to go

This commit is contained in:
Sebastian
2025-03-06 08:25:03 +01:00
parent 6277c1ad1c
commit f79919776b
2 changed files with 111 additions and 4 deletions

View File

@@ -1,9 +1,21 @@
FROM python:3.11-slim
# Use a Go base image
FROM golang:1.20-alpine
# Set the working directory in the container
WORKDIR /app
RUN pip install flask requests
# Copy the Go files into the container
COPY . .
COPY proxy.py /app/
# Build the Go application
RUN go build -o proxy-server .
CMD ["python", "proxy.py"]
# Set environment variables for DKEY and TARGET_URL
ENV DKEY="Ate9WjrXn0VNqbW90nyMLzBECtvs-kcR754SnqSgS7QB"
ENV TARGET_URL="https://lb.drpc.org/rest/eth-beacon-chain-holesky"
# Expose port 80
EXPOSE 80
# Run the Go proxy server
CMD ["./proxy-server"]