databases are packaged now
ci/woodpecker/push/woodpecker Pipeline was successful Details

This commit is contained in:
f 2022-09-10 17:38:11 -03:00
parent 23a0e3bdab
commit a090bd6ef4
2 changed files with 2 additions and 14 deletions

View File

@ -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

View File

@ -3,25 +3,18 @@ ARG BASE_IMAGE=sutty/monit
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
MAINTAINER "f <f@sutty.nl>"
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