databases are packaged now
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
23a0e3bdab
commit
a090bd6ef4
2 changed files with 2 additions and 14 deletions
|
@ -11,8 +11,6 @@ pipeline:
|
||||||
build_args:
|
build_args:
|
||||||
- ALPINE_VERSION=${ALPINE_VERSION}
|
- ALPINE_VERSION=${ALPINE_VERSION}
|
||||||
- BASE_IMAGE=registry.nulo.in/sutty/monit
|
- 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:
|
secrets:
|
||||||
- docker_password
|
- docker_password
|
||||||
when:
|
when:
|
||||||
|
@ -21,6 +19,3 @@ pipeline:
|
||||||
matrix:
|
matrix:
|
||||||
ALPINE_VERSION:
|
ALPINE_VERSION:
|
||||||
- 3.16.2
|
- 3.16.2
|
||||||
- 3.15.6
|
|
||||||
- 3.14.8
|
|
||||||
- 3.13.12
|
|
||||||
|
|
11
Dockerfile
11
Dockerfile
|
@ -3,25 +3,18 @@ ARG BASE_IMAGE=sutty/monit
|
||||||
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
|
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
|
||||||
MAINTAINER "f <f@sutty.nl>"
|
MAINTAINER "f <f@sutty.nl>"
|
||||||
|
|
||||||
ARG GEOIP2_DATABASE
|
ARG ACCESS_LOGS_FLAGS="--database=sqlite3:///root/development.sqlite3 -c /usr/share/crawler-user-agents/crawler-user-agents.json"
|
||||||
ARG CRAWLERS
|
|
||||||
ARG ACCESS_LOGS_FLAGS="--database=sqlite3:///root/development.sqlite3"
|
|
||||||
|
|
||||||
ENV ACCESS_LOGS_FLAGS=${ACCESS_LOGS_FLAGS}
|
ENV ACCESS_LOGS_FLAGS=${ACCESS_LOGS_FLAGS}
|
||||||
|
|
||||||
# Install nginx and remove default config
|
# 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
|
&& rm -rf /etc/nginx
|
||||||
|
|
||||||
# Add ssl group so nginx has access to certificates
|
# Add ssl group so nginx has access to certificates
|
||||||
RUN addgroup -S -g 777 ssl
|
RUN addgroup -S -g 777 ssl
|
||||||
RUN addgroup nginx 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 ./monit.conf /etc/monit.d/nginx.conf
|
||||||
COPY ./prometheusd.sh /usr/local/bin/prometheusd
|
COPY ./prometheusd.sh /usr/local/bin/prometheusd
|
||||||
COPY ./nginx /etc/nginx
|
COPY ./nginx /etc/nginx
|
||||||
|
|
Loading…
Reference in a new issue