commit
37bd3d2f0f
|
@ -2,25 +2,44 @@ name: Mark stale issues
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 8 * * *'
|
- cron: '0 8 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
issue_comment:
|
||||||
|
|
||||||
|
env:
|
||||||
|
stale_label: stale
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale_action:
|
||||||
|
if: github.event_name != 'issue_comment'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
issues: write
|
issues: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v7
|
- uses: actions/stale@v8.0.0
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
days-before-stale: 30
|
days-before-stale: 30
|
||||||
days-before-close: 5
|
days-before-close: 5
|
||||||
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.'
|
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.'
|
||||||
stale-issue-label: 'stale'
|
stale-issue-label: $stale_label
|
||||||
exempt-issue-labels: 'pinned, Fixed in next release, bug, never-stale, documentation, investigating'
|
exempt-issue-labels: 'pinned, Fixed in next release, bug, never-stale, documentation, investigating'
|
||||||
exempt-all-issue-assignees: true
|
exempt-all-issue-assignees: true
|
||||||
operations-per-run: 300
|
operations-per-run: 300
|
||||||
close-issue-reason: 'not_planned'
|
close-issue-reason: 'not_planned'
|
||||||
|
|
||||||
|
remove_stale: # trigger "stale" removal immediately when stale issues are commented on
|
||||||
|
if: github.event_name == 'issue_comment'
|
||||||
|
permissions:
|
||||||
|
contents: read # for actions/checkout
|
||||||
|
issues: write # to edit issues label
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3.4.0
|
||||||
|
- name: Remove 'stale' label
|
||||||
|
run: gh issue edit ${{ github.event.issue.number }} --remove-label $stale_label
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ jobs:
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v7.0.0
|
- uses: actions/stale@v8.0.0
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# Do not automatically mark PR/issue as stale
|
# Do not automatically mark PR/issue as stale
|
||||||
|
|
|
@ -123,7 +123,7 @@ There are other environment variables if you want to customize various things in
|
||||||
| `TEMPERATUREUNIT` | `c` | `<c\|k\|f>` | Set preferred temperature unit to `c`: Celsius, `k`: Kelvin, or `f` Fahrenheit units.
|
| `TEMPERATUREUNIT` | `c` | `<c\|k\|f>` | Set preferred temperature unit to `c`: Celsius, `k`: Kelvin, or `f` Fahrenheit units.
|
||||||
| `WEBUIBOXEDLAYOUT` | `boxed` | `<boxed\|traditional>` | Use boxed layout (helpful when working on large screens)
|
| `WEBUIBOXEDLAYOUT` | `boxed` | `<boxed\|traditional>` | Use boxed layout (helpful when working on large screens)
|
||||||
| `QUERY_LOGGING` | `true` | `<"true"\|"false">` | Enable query logging or not.
|
| `QUERY_LOGGING` | `true` | `<"true"\|"false">` | Enable query logging or not.
|
||||||
| `WEBTHEME` | `default-light` | `<"default-dark"\|"default-darker"\|"default-light"\|"default-auto"\|"lcars">`| User interface theme to use.
|
| `WEBTHEME` | `default-light` | `<"default-dark"\|"default-darker"\|"default-light"\|"default-auto"\|"high-contrast"\|"high-contrast-dark"\|"lcars">`| User interface theme to use.
|
||||||
| `WEBPASSWORD_FILE`| unset | `<Docker secret path>` |Set an Admin password using [Docker secrets](https://docs.docker.com/engine/swarm/secrets/). If `WEBPASSWORD` is set, `WEBPASSWORD_FILE` is ignored. If `WEBPASSWORD` is empty, and `WEBPASSWORD_FILE` is set to a valid readable file path, then `WEBPASSWORD` will be set to the contents of `WEBPASSWORD_FILE`.
|
| `WEBPASSWORD_FILE`| unset | `<Docker secret path>` |Set an Admin password using [Docker secrets](https://docs.docker.com/engine/swarm/secrets/). If `WEBPASSWORD` is set, `WEBPASSWORD_FILE` is ignored. If `WEBPASSWORD` is empty, and `WEBPASSWORD_FILE` is set to a valid readable file path, then `WEBPASSWORD` will be set to the contents of `WEBPASSWORD_FILE`.
|
||||||
|
|
||||||
### Advanced Variables
|
### Advanced Variables
|
||||||
|
@ -254,7 +254,7 @@ Do not attempt to upgrade (`pihole -up`) or reconfigure (`pihole -r`). New imag
|
||||||
* If you care about your data (logs/customizations), make sure you have it volume-mapped or it will be deleted in this step.
|
* If you care about your data (logs/customizations), make sure you have it volume-mapped or it will be deleted in this step.
|
||||||
3. Start your container with the newer base image: `docker run <args> pihole/pihole` (`<args>` being your preferred run volumes and env vars)
|
3. Start your container with the newer base image: `docker run <args> pihole/pihole` (`<args>` being your preferred run volumes and env vars)
|
||||||
|
|
||||||
Why is this style of upgrading good? A couple reasons: Everyone is starting from the same base image which has been tested to known it works. No worrying about upgrading from A to B, B to C, or A to C is required when rolling out updates, it reduces complexity, and simply allows a 'fresh start' every time while preserving customizations with volumes. Basically I'm encouraging [phoenix server](https://www.google.com/?q=phoenix+servers) principles for your containers.
|
Why is this style of upgrading good? A couple reasons: Everyone is starting from the same base image which has been tested to known it works. No worrying about upgrading from A to B, B to C, or A to C is required when rolling out updates, it reduces complexity, and simply allows a 'fresh start' every time while preserving customizations with volumes. Basically I'm encouraging [phoenix server](https://martinfowler.com/bliki/PhoenixServer.html) principles for your containers.
|
||||||
|
|
||||||
To reconfigure Pi-hole you'll either need to use an existing container environment variables or if there is no a variable for what you need, use the web UI or CLI commands.
|
To reconfigure Pi-hole you'll either need to use an existing container environment variables or if there is no a variable for what you need, use the web UI or CLI commands.
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/command/with-contenv bash
|
#!/command/with-contenv bash
|
||||||
|
|
||||||
s6-echo "Stopping cron"
|
s6-echo "Stopping cron"
|
||||||
killall -9 cron
|
killall --signal 9 cron
|
||||||
|
|
|
@ -3,4 +3,4 @@
|
||||||
s6-echo "Stopping lighttpd"
|
s6-echo "Stopping lighttpd"
|
||||||
service lighttpd-access-log stop
|
service lighttpd-access-log stop
|
||||||
service lighttpd-error-log stop
|
service lighttpd-error-log stop
|
||||||
killall -9 lighttpd
|
killall --signal 9 lighttpd
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/command/with-contenv bash
|
#!/command/with-contenv bash
|
||||||
|
|
||||||
s6-echo "Stopping pihole-FTL"
|
s6-echo "Stopping pihole-FTL"
|
||||||
killall -15 pihole-FTL
|
killall --signal 15 pihole-FTL
|
||||||
|
|
|
@ -43,6 +43,7 @@ setup_lighttpd_bind
|
||||||
|
|
||||||
# Misc Setup
|
# Misc Setup
|
||||||
# ===========================
|
# ===========================
|
||||||
|
installCron
|
||||||
setup_blocklists
|
setup_blocklists
|
||||||
|
|
||||||
# FTL setup
|
# FTL setup
|
||||||
|
|
|
@ -420,7 +420,7 @@ setup_web_theme(){
|
||||||
# If an invalid theme name was supplied, setup WEBTHEME to use the default-light theme.
|
# If an invalid theme name was supplied, setup WEBTHEME to use the default-light theme.
|
||||||
if [ -n "${WEBTHEME}" ]; then
|
if [ -n "${WEBTHEME}" ]; then
|
||||||
case "${WEBTHEME}" in
|
case "${WEBTHEME}" in
|
||||||
"default-dark" | "default-darker" | "default-light" | "default-auto" | "lcars")
|
"default-dark" | "default-darker" | "default-light" | "default-auto" | "high-contrast" | "high-contrast-dark" | "lcars")
|
||||||
echo " [i] Setting Web Theme based on WEBTHEME variable, using value ${WEBTHEME}"
|
echo " [i] Setting Web Theme based on WEBTHEME variable, using value ${WEBTHEME}"
|
||||||
change_setting "WEBTHEME" "${WEBTHEME}"
|
change_setting "WEBTHEME" "${WEBTHEME}"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -10,17 +10,13 @@ WEB_LOCAL_REPO=/var/www/html/admin
|
||||||
setupVars=/etc/pihole/setupVars.conf
|
setupVars=/etc/pihole/setupVars.conf
|
||||||
|
|
||||||
detect_arch() {
|
detect_arch() {
|
||||||
DETECTED_ARCH=$(dpkg --print-architecture)
|
DETECTED_ARCH=$(arch)
|
||||||
S6_ARCH=$DETECTED_ARCH
|
S6_ARCH=$DETECTED_ARCH
|
||||||
case $DETECTED_ARCH in
|
case $DETECTED_ARCH in
|
||||||
amd64)
|
|
||||||
S6_ARCH="x86_64";;
|
|
||||||
armel)
|
armel)
|
||||||
S6_ARCH="armhf";;
|
S6_ARCH="armhf";;
|
||||||
armhf)
|
armv7l)
|
||||||
S6_ARCH="armhf";;
|
S6_ARCH="armhf";;
|
||||||
arm64)
|
|
||||||
S6_ARCH="aarch64";;
|
|
||||||
i386)
|
i386)
|
||||||
S6_ARCH="i686";;
|
S6_ARCH="i686";;
|
||||||
esac
|
esac
|
||||||
|
@ -94,9 +90,15 @@ mv /etc/pihole/macvendor.db /macvendor.db
|
||||||
|
|
||||||
|
|
||||||
## Remove the default lighttpd unconfigured config:
|
## Remove the default lighttpd unconfigured config:
|
||||||
rm /etc/lighttpd/conf-enabled/99-unconfigured.conf
|
if [ -f /etc/lighttpd/conf-enabled/99-unconfigured.conf ]; then
|
||||||
|
rm /etc/lighttpd/conf-enabled/99-unconfigured.conf
|
||||||
|
fi
|
||||||
## Remove the default lighttpd placeholder page for good measure
|
## Remove the default lighttpd placeholder page for good measure
|
||||||
rm /var/www/html/index.lighttpd.html
|
if [ -f /var/www/html/index.lighttpd.html ]; then
|
||||||
|
rm /var/www/html/index.lighttpd.html
|
||||||
|
fi
|
||||||
|
## Remove redundant directories created by the installer to reduce docker image size
|
||||||
|
rm -rf /tmp/*
|
||||||
|
|
||||||
if [ ! -f /.piholeFirstBoot ]; then
|
if [ ! -f /.piholeFirstBoot ]; then
|
||||||
touch /.piholeFirstBoot
|
touch /.piholeFirstBoot
|
||||||
|
|
|
@ -10,7 +10,7 @@ RUN apt-get update && \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& pip3 install --no-cache-dir -U pip pipenv
|
&& pip3 install --no-cache-dir -U pip pipenv
|
||||||
|
|
||||||
RUN curl -L https://github.com/docker/compose/releases/download/2.10.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose && \
|
RUN curl --proto "=https" -L https://github.com/docker/compose/releases/download/2.10.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose && \
|
||||||
chmod +x /usr/local/bin/docker-compose
|
chmod +x /usr/local/bin/docker-compose
|
||||||
|
|
||||||
COPY ./cmd.sh /usr/local/bin/
|
COPY ./cmd.sh /usr/local/bin/
|
||||||
|
|
Loading…
Reference in New Issue