# this can probably be done, but I worry that people changing PG locales will have issues
# cd /usr/share/locale && rm -fr `ls -d */ | grep -v en`
-
RUN mkdir -p /etc/runit/3.d
ADD runit-1 /etc/runit/1
ADD runit-1.d-cleanup-pids /etc/runit/1.d/cleanup-pids
ADD runit-1.d-anacron /etc/runit/1.d/anacron
+ADD runit-1.d-00-fix-var-logs /etc/runit/1.d/00-fix-var-logs
ADD runit-2 /etc/runit/2
ADD runit-3 /etc/runit/3
ADD boot /sbin/boot
ADD cron /etc/service/cron/run
ADD rsyslog /etc/service/rsyslog/run
+ADD cron.d-anacron /etc/cron.d/anacron
--- /dev/null
+# this avoids using invoke-rc.d which is bust in image
+
+SHELL=/bin/sh
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+30 7 * * * root /usr/sbin/anacron -s >/dev/null
--- /dev/null
+#!/bin/bash
+mkdir -p /var/log/nginx
+chown -R www-data:www-data /var/log/nginx
+chown www-data:www-data /var/log/nginx
+chown -f syslog:adm /var/log/syslog*
+chown -f syslog:adm /var/log/auth.log*
+chown -f syslog:adm /var/log/kern.log*
- exec: /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not configured!"; exit 1; end'
- exec: /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end'
- exec: chown -R discourse /home/discourse
+ # TODO: move to base image (anacron can not be fired up using rc.d)
+ - exec: rm -f /etc/cron.d/anacron
+ - file:
+ path: /etc/cron.d/anacron
+ contents: |
+ SHELL=/bin/sh
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+ 30 7 * * * root /usr/sbin/anacron -s >/dev/null
- file:
path: /etc/runit/1.d/copy-env
chmod: "+x"