Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
Add MMDB download to Dockerfile (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes authored Jun 10, 2024
1 parent b4194be commit 155c5d4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 155c5d4

Please sign in to comment.