diff --git a/.woodpecker.yml b/.woodpecker.yml index d5e1011..46fecaf 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -11,8 +11,6 @@ pipeline: build_args: - ALPINE_VERSION=${ALPINE_VERSION} - BASE_IMAGE=registry.nulo.in/sutty/monit - - GEOIP2_DATABASE=https://archive.archlinux.org/packages/g/geoip2-database/geoip2-database-20191203-1-any.pkg.tar.xz - - CRAWLERS=https://raw.githubusercontent.com/monperrus/crawler-user-agents/master/crawler-user-agents.json secrets: - docker_password when: @@ -21,6 +19,3 @@ pipeline: matrix: ALPINE_VERSION: - 3.16.2 - - 3.15.6 - - 3.14.8 - - 3.13.12 diff --git a/Dockerfile b/Dockerfile index 0101bc0..f571cd3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,25 +3,18 @@ ARG BASE_IMAGE=sutty/monit FROM ${BASE_IMAGE}:${ALPINE_VERSION} MAINTAINER "f " -ARG GEOIP2_DATABASE -ARG CRAWLERS -ARG ACCESS_LOGS_FLAGS="--database=sqlite3:///root/development.sqlite3" +ARG ACCESS_LOGS_FLAGS="--database=sqlite3:///root/development.sqlite3 -c /usr/share/crawler-user-agents/crawler-user-agents.json" ENV ACCESS_LOGS_FLAGS=${ACCESS_LOGS_FLAGS} # Install nginx and remove default config -RUN apk add --no-cache nginx daemonize access_log nginx-prometheus-exporter \ +RUN apk add --no-cache nginx daemonize access_log nginx-prometheus-exporter geoip2-database-country geoip2-database-city crawler-user-agents \ && rm -rf /etc/nginx # Add ssl group so nginx has access to certificates RUN addgroup -S -g 777 ssl RUN addgroup nginx ssl -# Databases -RUN wget ${GEOIP2_DATABASE} -O - | tar -xJf - \ - && rm usr/share/GeoIP/GeoLite2-ASN.mmdb .BUILDINFO .MTREE .PKGINFO -RUN wget "${CRAWLERS}" -O /usr/share/nginx/crawler-user-agents.json - COPY ./monit.conf /etc/monit.d/nginx.conf COPY ./prometheusd.sh /usr/local/bin/prometheusd COPY ./nginx /etc/nginx