File tree Expand file tree Collapse file tree 5 files changed +34
-1
lines changed Expand file tree Collapse file tree 5 files changed +34
-1
lines changed Original file line number Diff line number Diff line change 25
25
username : ${{ secrets.DOCKER_USERNAME }}
26
26
password : ${{ secrets.DOCKER_PASSWORD }}
27
27
repository : justb4/awstats
28
- tags : latest,7.6-1
28
+ tags : latest,7.6-2
29
29
tag_with_ref : false
30
30
tag_with_sha : true
Original file line number Diff line number Diff line change 15
15
&& apt-get -yy install awstats gettext-base libapache2-mod-perl2 ${GEOIP_PACKAGES} supervisor cron \
16
16
&& echo 'Include conf/awstats_httpd.conf' >> /usr/local/apache2/conf/httpd.conf \
17
17
&& mkdir /var/www && mv /usr/share/awstats/icon /var/www/icons && chown -R www-data:www-data /var/www \
18
+ && mkdir -p /aw-setup.d && mkdir -p /aw-update.d \
18
19
&& apt-get clean && rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
19
20
20
21
# Configurations, some are templates to be substituted with env vars
Original file line number Diff line number Diff line change 1
1
README
2
2
======
3
3
4
+
5
+ ![ GitHub license] ( https://img.shields.io/github/license/justb4/docker-awstats )
6
+ ![ GitHub release] ( https://img.shields.io/github/release/justb4/docker-awstats.svg )
7
+ ![ Docker Pulls] ( https://img.shields.io/docker/pulls/justb4/awstats.svg )
8
+
4
9
All-in-one [ Awstats] ( http://www.awstats.org ) Docker Image for scheduled log-processing on multiple domains with minimal config, accessible
5
10
via built-in webpage. Find [ built Docker Images on Docker Hub] ( https://hub.docker.com/repository/docker/justb4/awstats ) .
6
11
NB some links below refer to relative files on GitHub, read [ full/latest README here] ( https://github.com/justb4/docker-awstats ) .
@@ -17,6 +22,8 @@ Features
17
22
* landing HTML page for all configured sites
18
23
* configurable ` subpath ` (prefix) for running behind reverse proxy
19
24
* easy run with [ docker-compose] ( test/docker-compose.yml )
25
+ * run user-defined scripts once before startup (` aw-setup.sh ` )
26
+ * run user-defined scripts before each scheduled ` awstats ` run (` aw-update.sh ` ), e.g. for log file sync
20
27
21
28
The aim was to make this image as self-contained as possible with minimal host-dependencies.
22
29
@@ -80,6 +87,15 @@ The entry program is `supervisord` that will run a [setup program once](scripts/
80
87
Advanced
81
88
========
82
89
90
+ User-defined Scripts
91
+ --------------------
92
+
93
+ User-defined Shell/Bash scripts can be added in the directories ` /aw-setup.d ` and/or ` /aw-update.d ` by extending
94
+ the Docker Image or easier via Docker Volume Mounting.
95
+
96
+ Purpose is to provide hooks for preprocessing. For example, a script that fetches/syncs a logfile from a remote
97
+ server just before [ aw-update.sh] ( scripts/aw-update.sh ) runs. This ensures the data is available.
98
+
83
99
Analyze old log files
84
100
---------------------
85
101
Original file line number Diff line number Diff line change 4
4
5
5
echo " START aw-setup"
6
6
7
+ echo " Running one-time provisioning"
8
+ for f in /aw-setup.d/*
9
+ do
10
+ case " $f " in
11
+ * /* .sh) echo " $0 : running $f " && . " $f " ;;
12
+ esac
13
+ done
14
+
7
15
INDEX_HTML=/var/www/index.html
8
16
9
17
pushd ${AWSTATS_SITES_DIR}
Original file line number Diff line number Diff line change 4
4
5
5
echo " START aw-update"
6
6
7
+ echo " Running additional provisioning"
8
+ for f in /aw-update.d/*
9
+ do
10
+ case " $f " in
11
+ * /* .sh) echo " $0 : running $f " && . " $f " ;;
12
+ esac
13
+ done
14
+
7
15
pushd /etc/awstats
8
16
for SITE_CONF in $( ls awstats.* .conf)
9
17
do
You can’t perform that action at this time.
0 commit comments