From 8663071f5b8634db0c468ec8af9e5fa0bee95277 Mon Sep 17 00:00:00 2001 From: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Sun, 1 Mar 2026 15:58:45 -0600 Subject: [PATCH 1/5] docs: update GHCR image references to baker-scripts org --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 05690d7..702d1c0 100644 --- a/README.md +++ b/README.md @@ -244,7 +244,7 @@ docker run -d \ -e PUID=1000 \ -e PGID=1000 \ -v ./config:/config \ - ghcr.io/bakerboy448/redditmodlog:1 + ghcr.io/baker-scripts/redditmodlog:1 # 4. Using Docker Compose (recommended) docker compose up -d @@ -270,7 +270,7 @@ docker run -d \ -e REDDIT_PASSWORD=your_password \ -e SOURCE_SUBREDDIT=yoursubreddit \ -v ./config:/config \ - ghcr.io/bakerboy448/redditmodlog:1 + ghcr.io/baker-scripts/redditmodlog:1 ``` ### Docker Compose Example @@ -280,7 +280,7 @@ version: '3.8' services: redditmodlog-opensignups: - image: ghcr.io/bakerboy448/redditmodlog:1 + image: ghcr.io/baker-scripts/redditmodlog:1 container_name: redditmodlog-opensignups restart: unless-stopped environment: @@ -321,13 +321,13 @@ services: Pre-built images available at GitHub Container Registry: **Recommended Tags:** -- `ghcr.io/bakerboy448/redditmodlog:1` - Major version (gets v1.x.x updates automatically) -- `ghcr.io/bakerboy448/redditmodlog:1.4` - Minor version (gets v1.4.x patches only) -- `ghcr.io/bakerboy448/redditmodlog:1.4.3` - Specific version (pinned, no updates) +- `ghcr.io/baker-scripts/redditmodlog:1` - Major version (gets v1.x.x updates automatically) +- `ghcr.io/baker-scripts/redditmodlog:1.4` - Minor version (gets v1.4.x patches only) +- `ghcr.io/baker-scripts/redditmodlog:1.4.3` - Specific version (pinned, no updates) **Other Tags:** -- `ghcr.io/bakerboy448/redditmodlog:latest` - Always latest build (use with caution) -- `ghcr.io/bakerboy448/redditmodlog:sha-` - Specific commit SHA +- `ghcr.io/baker-scripts/redditmodlog:latest` - Always latest build (use with caution) +- `ghcr.io/baker-scripts/redditmodlog:sha-` - Specific commit SHA **Architectures:** `linux/amd64`, `linux/arm64` From 7b4c03192992752831210918d6c6e15bd647fc1c Mon Sep 17 00:00:00 2001 From: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Sun, 1 Mar 2026 15:58:51 -0600 Subject: [PATCH 2/5] fix: update GHCR image reference to baker-scripts org --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 08b1065..f7706dc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ services: modlog-bot: build: . - image: ghcr.io/bakerboy448/redditmodlog:latest + image: ghcr.io/baker-scripts/redditmodlog:latest container_name: reddit-modlog-bot restart: unless-stopped environment: From 17e4b5a3fe074d0e36d359e0b02e2f6d44a4280c Mon Sep 17 00:00:00 2001 From: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Sun, 1 Mar 2026 15:58:54 -0600 Subject: [PATCH 3/5] fix: update OCI image labels to baker-scripts org --- Dockerfile | 129 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 85 insertions(+), 44 deletions(-) diff --git a/Dockerfile b/Dockerfile index 08a99bd..8ec4c0f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,11 +20,11 @@ FROM python:3.11-slim # OCI Labels LABEL org.opencontainers.image.title="Reddit ModLog Wiki Publisher" \ org.opencontainers.image.description="Automated Reddit moderation log publisher to wiki pages" \ - org.opencontainers.image.authors="bakerboy448" \ - org.opencontainers.image.source="https://github.com/bakerboy448/RedditModLog" \ - org.opencontainers.image.documentation="https://github.com/bakerboy448/RedditModLog/blob/main/README.md" \ + org.opencontainers.image.authors="baker-scripts" \ + org.opencontainers.image.source="https://github.com/baker-scripts/RedditModLog" \ + org.opencontainers.image.documentation="https://github.com/baker-scripts/RedditModLog/blob/main/README.md" \ org.opencontainers.image.licenses="GPL-3.0" \ - org.opencontainers.image.vendor="bakerboy448" \ + org.opencontainers.image.vendor="baker-scripts" \ org.opencontainers.image.base.name="python:3.11-slim" # Install runtime dependencies and s6-overlay for user management @@ -74,50 +74,91 @@ ENV PATH="/opt/venv/bin:$PATH" \ RUN mkdir -p /config /config/data /config/logs /app /etc/s6-overlay/s6-rc.d/modlog-bot /etc/s6-overlay/s6-rc.d/init-modlogbot /etc/s6-overlay/scripts # Create s6 init script for user/group management -RUN echo '#!/command/with-contenv bash\n\ -set -e\n\ -\n\ -# Validate that we have either config file OR environment variables\n\ -if [ ! -f /config/config.json ]; then\n\ - echo "No config file found at /config/config.json, checking environment variables..."\n\ - missing_vars=()\n\ - [ -z "$REDDIT_CLIENT_ID" ] && missing_vars+=("REDDIT_CLIENT_ID")\n\ - [ -z "$REDDIT_CLIENT_SECRET" ] && missing_vars+=("REDDIT_CLIENT_SECRET")\n\ - [ -z "$REDDIT_USERNAME" ] && missing_vars+=("REDDIT_USERNAME")\n\ - [ -z "$REDDIT_PASSWORD" ] && missing_vars+=("REDDIT_PASSWORD")\n\ - [ -z "$SOURCE_SUBREDDIT" ] && missing_vars+=("SOURCE_SUBREDDIT")\n\ - if [ ${#missing_vars[@]} -ne 0 ]; then\n\ - echo "ERROR: No config file and missing required environment variables:" >&2\n\ - printf " - %s\n" "${missing_vars[@]}" >&2\n\ - echo "" >&2\n\ - echo "Either mount a config file to /config/config.json OR set environment variables." >&2\n\ - exit 1\n\ - fi\n\ - echo "Using environment variables for configuration"\n\ -else\n\ - echo "Using config file: /config/config.json"\n\ -fi\n\ -\n\ -PUID=${PUID:-1000}\n\ -PGID=${PGID:-1000}\n\ -echo "Setting UID:GID to ${PUID}:${PGID}"\n\ -\n\ -groupmod -o -g "$PGID" modlogbot\n\ -usermod -o -u "$PUID" modlogbot\n\ -\n\ -echo "Fixing ownership of /config"\n\ -chown -R modlogbot:modlogbot /config\n\ -\n\ -if [ ! -f /config/data/modlog.db ]; then\n\ - echo "Initializing database directory"\n\ - touch /config/data/modlog.db\n\ - chown modlogbot:modlogbot /config/data/modlog.db\n\ +RUN echo '#!/command/with-contenv bash +\ +set -e +\ + +\ +# Validate that we have either config file OR environment variables +\ +if [ ! -f /config/config.json ]; then +\ + echo "No config file found at /config/config.json, checking environment variables..." +\ + missing_vars=() +\ + [ -z "$REDDIT_CLIENT_ID" ] && missing_vars+=("REDDIT_CLIENT_ID") +\ + [ -z "$REDDIT_CLIENT_SECRET" ] && missing_vars+=("REDDIT_CLIENT_SECRET") +\ + [ -z "$REDDIT_USERNAME" ] && missing_vars+=("REDDIT_USERNAME") +\ + [ -z "$REDDIT_PASSWORD" ] && missing_vars+=("REDDIT_PASSWORD") +\ + [ -z "$SOURCE_SUBREDDIT" ] && missing_vars+=("SOURCE_SUBREDDIT") +\ + if [ ${#missing_vars[@]} -ne 0 ]; then +\ + echo "ERROR: No config file and missing required environment variables:" >&2 +\ + printf " - %s +" "${missing_vars[@]}" >&2 +\ + echo "" >&2 +\ + echo "Either mount a config file to /config/config.json OR set environment variables." >&2 +\ + exit 1 +\ + fi +\ + echo "Using environment variables for configuration" +\ +else +\ + echo "Using config file: /config/config.json" +\ +fi +\ + +\ +PUID=${PUID:-1000} +\ +PGID=${PGID:-1000} +\ +echo "Setting UID:GID to ${PUID}:${PGID}" +\ + +\ +groupmod -o -g "$PGID" modlogbot +\ +usermod -o -u "$PUID" modlogbot +\ + +\ +echo "Fixing ownership of /config" +\ +chown -R modlogbot:modlogbot /config +\ + +\ +if [ ! -f /config/data/modlog.db ]; then +\ + echo "Initializing database directory" +\ + touch /config/data/modlog.db +\ + chown modlogbot:modlogbot /config/data/modlog.db +\ fi' > /etc/s6-overlay/scripts/init-modlogbot-run && \ chmod +x /etc/s6-overlay/scripts/init-modlogbot-run # Create s6 service run script -RUN echo '#!/command/with-contenv bash\n\ -cd /app\n\ +RUN echo '#!/command/with-contenv bash +\ +cd /app +\ exec s6-setuidgid modlogbot python modlog_wiki_publisher.py --config /config/config.json --continuous' > /etc/s6-overlay/scripts/modlog-bot-run && \ chmod +x /etc/s6-overlay/scripts/modlog-bot-run From 0eaca303a6d526a6fb28cea3929b754b1f68879d Mon Sep 17 00:00:00 2001 From: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Sun, 1 Mar 2026 15:59:02 -0600 Subject: [PATCH 4/5] fix: use dynamic github.repository_owner for IMAGE_NAME --- .github/workflows/docker-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index c1c8da8..941b32a 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -24,7 +24,7 @@ on: env: REGISTRY: ghcr.io - IMAGE_NAME: bakerboy448/redditmodlog + IMAGE_NAME: ${{ github.repository_owner }}/redditmodlog jobs: build: @@ -67,7 +67,7 @@ jobs: labels: | org.opencontainers.image.title=Reddit ModLog Wiki Publisher org.opencontainers.image.description=Automated Reddit moderation log publisher to wiki pages - org.opencontainers.image.vendor=bakerboy448 + org.opencontainers.image.vendor=baker-scripts org.opencontainers.image.licenses=GPL-3.0 - name: Build and push Docker image From 7a10869d0682edb300520459e3fd8c2fc7d22a27 Mon Sep 17 00:00:00 2001 From: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Sun, 1 Mar 2026 16:01:28 -0600 Subject: [PATCH 5/5] fix: correct Dockerfile - preserve escape sequences in s6 scripts --- Dockerfile | 121 ++++++++++++++++++----------------------------------- 1 file changed, 40 insertions(+), 81 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8ec4c0f..a68ac40 100644 --- a/Dockerfile +++ b/Dockerfile @@ -74,91 +74,50 @@ ENV PATH="/opt/venv/bin:$PATH" \ RUN mkdir -p /config /config/data /config/logs /app /etc/s6-overlay/s6-rc.d/modlog-bot /etc/s6-overlay/s6-rc.d/init-modlogbot /etc/s6-overlay/scripts # Create s6 init script for user/group management -RUN echo '#!/command/with-contenv bash -\ -set -e -\ - -\ -# Validate that we have either config file OR environment variables -\ -if [ ! -f /config/config.json ]; then -\ - echo "No config file found at /config/config.json, checking environment variables..." -\ - missing_vars=() -\ - [ -z "$REDDIT_CLIENT_ID" ] && missing_vars+=("REDDIT_CLIENT_ID") -\ - [ -z "$REDDIT_CLIENT_SECRET" ] && missing_vars+=("REDDIT_CLIENT_SECRET") -\ - [ -z "$REDDIT_USERNAME" ] && missing_vars+=("REDDIT_USERNAME") -\ - [ -z "$REDDIT_PASSWORD" ] && missing_vars+=("REDDIT_PASSWORD") -\ - [ -z "$SOURCE_SUBREDDIT" ] && missing_vars+=("SOURCE_SUBREDDIT") -\ - if [ ${#missing_vars[@]} -ne 0 ]; then -\ - echo "ERROR: No config file and missing required environment variables:" >&2 -\ - printf " - %s -" "${missing_vars[@]}" >&2 -\ - echo "" >&2 -\ - echo "Either mount a config file to /config/config.json OR set environment variables." >&2 -\ - exit 1 -\ - fi -\ - echo "Using environment variables for configuration" -\ -else -\ - echo "Using config file: /config/config.json" -\ -fi -\ - -\ -PUID=${PUID:-1000} -\ -PGID=${PGID:-1000} -\ -echo "Setting UID:GID to ${PUID}:${PGID}" -\ - -\ -groupmod -o -g "$PGID" modlogbot -\ -usermod -o -u "$PUID" modlogbot -\ - -\ -echo "Fixing ownership of /config" -\ -chown -R modlogbot:modlogbot /config -\ - -\ -if [ ! -f /config/data/modlog.db ]; then -\ - echo "Initializing database directory" -\ - touch /config/data/modlog.db -\ - chown modlogbot:modlogbot /config/data/modlog.db -\ +RUN echo '#!/command/with-contenv bash\n\ +set -e\n\ +\n\ +# Validate that we have either config file OR environment variables\n\ +if [ ! -f /config/config.json ]; then\n\ + echo "No config file found at /config/config.json, checking environment variables..."\n\ + missing_vars=()\n\ + [ -z "$REDDIT_CLIENT_ID" ] && missing_vars+=("REDDIT_CLIENT_ID")\n\ + [ -z "$REDDIT_CLIENT_SECRET" ] && missing_vars+=("REDDIT_CLIENT_SECRET")\n\ + [ -z "$REDDIT_USERNAME" ] && missing_vars+=("REDDIT_USERNAME")\n\ + [ -z "$REDDIT_PASSWORD" ] && missing_vars+=("REDDIT_PASSWORD")\n\ + [ -z "$SOURCE_SUBREDDIT" ] && missing_vars+=("SOURCE_SUBREDDIT")\n\ + if [ ${#missing_vars[@]} -ne 0 ]; then\n\ + echo "ERROR: No config file and missing required environment variables:" >&2\n\ + printf " - %s\n" "${missing_vars[@]}" >&2\n\ + echo "" >&2\n\ + echo "Either mount a config file to /config/config.json OR set environment variables." >&2\n\ + exit 1\n\ + fi\n\ + echo "Using environment variables for configuration"\n\ +else\n\ + echo "Using config file: /config/config.json"\n\ +fi\n\ +\n\ +PUID=${PUID:-1000}\n\ +PGID=${PGID:-1000}\n\ +echo "Setting UID:GID to ${PUID}:${PGID}"\n\ +\n\ +groupmod -o -g "$PGID" modlogbot\n\ +usermod -o -u "$PUID" modlogbot\n\ +\n\ +echo "Fixing ownership of /config"\n\ +chown -R modlogbot:modlogbot /config\n\ +\n\ +if [ ! -f /config/data/modlog.db ]; then\n\ + echo "Initializing database directory"\n\ + touch /config/data/modlog.db\n\ + chown modlogbot:modlogbot /config/data/modlog.db\n\ fi' > /etc/s6-overlay/scripts/init-modlogbot-run && \ chmod +x /etc/s6-overlay/scripts/init-modlogbot-run # Create s6 service run script -RUN echo '#!/command/with-contenv bash -\ -cd /app -\ +RUN echo '#!/command/with-contenv bash\n\ +cd /app\n\ exec s6-setuidgid modlogbot python modlog_wiki_publisher.py --config /config/config.json --continuous' > /etc/s6-overlay/scripts/modlog-bot-run && \ chmod +x /etc/s6-overlay/scripts/modlog-bot-run