diff --git a/Dockerfile b/Dockerfile index 142808f..baf50fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,18 @@ COPY . ./ RUN go get ./... RUN go build -v -o /livestream ./... +# Fetch the GeoLite2-City database that will be used for IP geolocation within Django. +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + "ca-certificates" \ + "curl" \ + "brotli" \ + && \ + rm -rf /var/lib/apt/lists/* && \ + mkdir share && \ + ( curl -s -L "https://mmdbcdn.posthog.net/" --http1.1 | brotli --decompress --output=/mmdb.db ) && \ + chmod -R 755 /mmdb.db + FROM ubuntu -COPY --from=builder /livestream /livestream +COPY --from=builder /livestream /mmdb.db / CMD ["/livestream"]