-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 91c3c11
Showing
109 changed files
with
10,070 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/Dockerfile | ||
/LICENSE | ||
/README.md | ||
/.github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"config:base", | ||
"docker:enableMajor", | ||
"default:automergeDigest" | ||
], | ||
"packageRules": [ | ||
{ | ||
"matchDatasources": ["docker"], | ||
"matchPackageNames": ["ubuntu"], | ||
"matchUpdateTypes": ["minor", "patch", "pin", "digest"], | ||
"automerge": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Docker | ||
|
||
# This all came from github. I wrote none of it, but I did remove some bits that didn't work. | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
# Publish semver tags as releases. | ||
tags: [ 'v*.*.*' ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
env: | ||
# Use docker.io for Docker Hub if empty | ||
REGISTRY: ghcr.io | ||
# github.repository as <account>/<repo> | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
# This is used to complete the identity challenge | ||
# with sigstore/fulcio when running outside of PRs. | ||
id-token: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | ||
|
||
# Workaround: https://github.com/docker/build-push-action/issues/461 | ||
- name: Setup Docker buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
# Login against a Docker registry except on PR | ||
# https://github.com/docker/login-action | ||
- name: Log into registry ${{ env.REGISTRY }} | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Extract metadata (tags, labels) for Docker | ||
# https://github.com/docker/metadata-action | ||
- name: Extract Docker metadata | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
# Build and push Docker image with Buildx (don't push on PR) | ||
# https://github.com/docker/build-push-action | ||
- name: Build and push Docker image | ||
id: build-and-push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.18 | ||
|
||
# set version label | ||
ARG BUILD_DATE | ||
ARG VERSION | ||
ARG NGINX_VERSION | ||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" | ||
LABEL maintainer="aptalca" | ||
|
||
# install packages | ||
RUN \ | ||
if [ -z ${NGINX_VERSION+x} ]; then \ | ||
NGINX_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ | ||
&& awk '/^P:nginx$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \ | ||
fi && \ | ||
apk add --no-cache \ | ||
memcached \ | ||
nginx==${NGINX_VERSION} \ | ||
nginx-mod-http-brotli==${NGINX_VERSION} \ | ||
nginx-mod-http-dav-ext==${NGINX_VERSION} \ | ||
nginx-mod-http-echo==${NGINX_VERSION} \ | ||
nginx-mod-http-fancyindex==${NGINX_VERSION} \ | ||
nginx-mod-http-geoip==${NGINX_VERSION} \ | ||
nginx-mod-http-geoip2==${NGINX_VERSION} \ | ||
nginx-mod-http-headers-more==${NGINX_VERSION} \ | ||
nginx-mod-http-image-filter==${NGINX_VERSION} \ | ||
nginx-mod-http-perl==${NGINX_VERSION} \ | ||
nginx-mod-http-redis2==${NGINX_VERSION} \ | ||
nginx-mod-http-set-misc==${NGINX_VERSION} \ | ||
nginx-mod-http-upload-progress==${NGINX_VERSION} \ | ||
nginx-mod-http-xslt-filter==${NGINX_VERSION} \ | ||
nginx-mod-mail==${NGINX_VERSION} \ | ||
nginx-mod-rtmp==${NGINX_VERSION} \ | ||
nginx-mod-stream==${NGINX_VERSION} \ | ||
nginx-mod-stream-geoip==${NGINX_VERSION} \ | ||
nginx-mod-stream-geoip2==${NGINX_VERSION} \ | ||
nginx-vim==${NGINX_VERSION} \ | ||
php82-bcmath \ | ||
php82-bz2 \ | ||
php82-dom \ | ||
php82-exif \ | ||
php82-ftp \ | ||
php82-gd \ | ||
php82-gmp \ | ||
php82-imap \ | ||
php82-intl \ | ||
php82-ldap \ | ||
php82-mysqli \ | ||
php82-mysqlnd \ | ||
php82-opcache \ | ||
php82-pdo_mysql \ | ||
php82-pdo_odbc \ | ||
php82-pdo_pgsql \ | ||
php82-pdo_sqlite \ | ||
php82-pear \ | ||
php82-pecl-apcu \ | ||
php82-pecl-memcached \ | ||
php82-pecl-redis \ | ||
php82-pgsql \ | ||
php82-posix \ | ||
php82-soap \ | ||
php82-sockets \ | ||
php82-sodium \ | ||
php82-sqlite3 \ | ||
php82-tokenizer \ | ||
php82-xmlreader \ | ||
php82-xsl && \ | ||
apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community \ | ||
php82-pecl-mcrypt && \ | ||
echo "**** configure php-fpm to pass env vars ****" && \ | ||
sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php82/php-fpm.d/www.conf && \ | ||
grep -qxF 'clear_env = no' /etc/php82/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php82/php-fpm.d/www.conf && \ | ||
echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php82/php-fpm.conf | ||
|
||
ARG INSTALL_PACKAGES=docker gzip | ||
RUN apk add --update ${INSTALL_PACKAGES} && \ | ||
addgroup -g 281 unraiddocker && \ | ||
usermod -aG unraiddocker abc | ||
|
||
# add local files | ||
COPY root/ / | ||
|
||
# ports and volumes | ||
EXPOSE 80 443 | ||
|
||
VOLUME /config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Docker Watcher | ||
|
||
### Purpose | ||
Simple UI driven way to manage updates & notifications for containers. As this is meant to be simple, there is no db container required or setup. This will save things it needs to files in the `/config` mount instead. | ||
|
||
### Notification triggers | ||
- Notify when a container is added | ||
- Notify when a container is removed | ||
- Notify when a container changes state (running -> stopped) | ||
- Nofity when an update is available | ||
- Notify when an update is applied | ||
- Notify if memory is > n% | ||
- Notify if CPU is > n% | ||
|
||
### Notification platforms | ||
- Notifiarr | ||
|
||
### Update options | ||
- Ignore | ||
- Auto update | ||
- Check for update | ||
|
||
### Image | ||
`ghcr.io/notifiarr/dockwatch:main` | ||
|
||
### Install | ||
`docker pull ghcr.io/notifiarr/dockwatch:main` | ||
|
||
### Run | ||
This is an example from an Unraid install | ||
|
||
``` | ||
docker run | ||
-d | ||
--name='dockwatch' | ||
--net='custom-bridge' | ||
-e TZ="America/New_York" | ||
-e HOST_OS="Unraid" | ||
-e 'PUID'='1001' | ||
-e 'PGID'='100' | ||
-e 'UMASK'='022' | ||
-l net.unraid.docker.managed=dockerman | ||
-l net.unraid.docker.webui='http://[IP]:[PORT:9999]' | ||
-l net.unraid.docker.icon='https://golift.io/crontabs.png' | ||
-p '9999:80/tcp' | ||
-v '/mnt/disk1/appdata/dockwatch/config':'/config':'rw' | ||
-v '/mnt/disk1/appdata/dockwatch/logs':'/logs':'rw' | ||
-v '/var/run/docker.sock':'/var/run/docker.sock':'rw' 'ghcr.io/notifiarr/dockwatch:main' | ||
``` | ||
|
||
### Permissions | ||
No matter how docker is installed (native, unraid, etc), it is required that the user running the container has permission to use the docker commands | ||
|
||
Unraid: This is built into the container with | ||
``` | ||
addgroup -g 281 unraiddocker && \ | ||
usermod -aG unraiddocker abc | ||
``` | ||
|
||
Ubuntu: This is an example | ||
``` | ||
usermod -aG ping abc | ||
``` | ||
|
||
### ENV | ||
These are my settings, adjust them to fit your setup!! | ||
|
||
Volumes | ||
| Name | Host | Container | | ||
| ----- | ----- | ----- | | ||
| App Config | /mnt/disk1/appdata/dockwatch/config | /config | | ||
| Logs | /mnt/disk1/appdata/dockwatch/logs | /logs | | ||
| Docker sock | /var/run/docker.sock | /var/run/docker.sock | | ||
|
||
Ports | ||
| Inside | Outside | | ||
| ----- | ----- | | ||
| 80 | 9999 | | ||
|
||
Variables | ||
| Name | Key | Value | | ||
| ----- | ----- | ----- | | ||
| PUID | PUID | 1001 | | ||
| PGID | PGID | 100 | | ||
| UMASK | UMASK | 022 | |
Oops, something went wrong.