forked from admin/ansible
x
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install --no-install-recommends -y \
|
||||
busybox \
|
||||
cron \
|
||||
sarg \
|
||||
supervisor \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& mkdir -p /www
|
||||
|
||||
COPY sarg-minute.cron /etc/cron.d/sarg-minute
|
||||
COPY sarg.conf /etc/sarg/sarg.conf
|
||||
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
||||
|
||||
RUN chmod 0644 /etc/cron.d/sarg-minute
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"]
|
||||
@@ -31,7 +31,8 @@ services:
|
||||
condition: on-failure
|
||||
|
||||
sarg:
|
||||
image: starina/squid-sarg-cron:latest
|
||||
build: .
|
||||
image: hermes-sarg:latest
|
||||
hostname: sarg
|
||||
networks:
|
||||
- admin
|
||||
@@ -39,11 +40,6 @@ services:
|
||||
- target: 80
|
||||
published: 8090
|
||||
protocol: tcp
|
||||
configs:
|
||||
- source: sarg_conf
|
||||
target: /etc/sarg/sarg.conf
|
||||
- source: sarg_minute_cron
|
||||
target: /etc/cron.d/sarg-minute
|
||||
volumes:
|
||||
- squid_logs:/var/log/squid:ro
|
||||
- squid_reports:/www
|
||||
@@ -155,10 +151,6 @@ networks:
|
||||
configs:
|
||||
squid_conf:
|
||||
file: ./squid.conf
|
||||
sarg_conf:
|
||||
file: ./sarg.conf
|
||||
sarg_minute_cron:
|
||||
file: ./sarg-minute.cron
|
||||
nginx_hermes_conf:
|
||||
file: ./nginx-hermes.conf
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
logfile=/dev/null
|
||||
logfile_maxbytes=0
|
||||
pidfile=/var/run/supervisord.pid
|
||||
loglevel=info
|
||||
|
||||
[program:cron]
|
||||
command=/usr/sbin/cron -f
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=10
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
|
||||
[program:httpd]
|
||||
command=/usr/bin/busybox httpd -fv -p 80 -h /www
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=15
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
Reference in New Issue
Block a user