7436bf6e2e
C changes: - gstorage.c: encode continent into root key for --persist --restore survival - gholder.c: decode continent from root + lat/lng storage - commons.h: add lat/lng fields to GMetrics struct - geoip2.c/geoip1.h: extract coordinates from MMDB - json.c: output lat/lng in geolocation JSON JS changes: - Remove cityIndex guard for static HTML city dots - TopoJSON lat/lng fallback for city coordinates - updateMap fallback city collection - Dynamic orthographic center based on visitor count - Mercator stays at [0,15] for full world view Co-Authored-By: Claude <noreply@anthropic.com>
42 lines
1.0 KiB
Docker
42 lines
1.0 KiB
Docker
# Build stage
|
|
FROM alpine:3.20 AS builds
|
|
RUN apk add --no-cache \
|
|
autoconf \
|
|
automake \
|
|
build-base \
|
|
clang \
|
|
gettext-dev \
|
|
libmaxminddb-dev \
|
|
openssl-dev \
|
|
linux-headers \
|
|
ncurses-dev \
|
|
pkgconf \
|
|
tzdata
|
|
|
|
# GoAccess
|
|
COPY . /goaccess
|
|
WORKDIR /goaccess
|
|
RUN autoreconf -fiv && rm -rf autom4te.cache
|
|
RUN CC="clang" CFLAGS="-O3" LIBS="$(pkg-config --libs openssl)" ./configure --prefix=/usr --enable-utf8 --with-openssl --enable-geoip=mmdb
|
|
RUN make -j$(nproc) && make DESTDIR=/dist install
|
|
# Check dynamic dependencies
|
|
RUN ldd /dist/usr/bin/goaccess && echo "Dependencies checked"
|
|
|
|
# Runtime stage
|
|
FROM alpine:3.20
|
|
RUN apk add --no-cache \
|
|
gettext-libs \
|
|
libmaxminddb \
|
|
ncurses-libs \
|
|
openssl \
|
|
tzdata
|
|
# Copy GoAccess binary and assets
|
|
COPY --from=builds /dist/usr/bin/goaccess /usr/bin/goaccess
|
|
COPY --from=builds /dist/usr/share /usr/share
|
|
COPY --from=builds /usr/share/zoneinfo /usr/share/zoneinfo
|
|
# Set up volume and port
|
|
VOLUME /var/www/goaccess
|
|
EXPOSE 7890
|
|
ENTRYPOINT ["/usr/bin/goaccess"]
|
|
CMD ["--help"]
|