Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 31 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,37 @@
FROM python:3.13.6
# Use a stable Python base image (Debian 12 based)
FROM python:3.11-slim

# Set environment variables
ENV WEBHOOK_URL_PREFIX="wiki/hooks"
RUN apt update
RUN apt install -y unzip apache2 build-essential python3-dev python3-pip python3-setuptools python3-wheel python3-cffi libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev shared-mime-info git

# Install system dependencies
RUN apt update && apt install -y --no-install-recommends \
unzip apache2 build-essential python3-dev python3-pip \
python3-setuptools python3-wheel python3-cffi libcairo2 \
libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf-2.0-0 \
libffi-dev shared-mime-info git wget curl ca-certificates \
&& apt clean && rm -rf /var/lib/apt/lists/*

# Copy and install Python dependencies
ADD requirements.txt .
RUN python -m pip install -r requirements.txt
RUN wget -qO- https://github.com/adnanh/webhook/releases/download/2.8.1/webhook-linux-amd64.tar.gz \
| tar xzv --strip 1 -C /usr/local/bin
RUN mkdir -p /var/webhook /srv_root/docs
RUN pip install --no-cache-dir -r requirements.txt

# Install webhook binary
RUN wget -qO- https://github.com/adnanh/webhook/releases/download/2.8.1/webhook-linux-amd64.tar.gz \
| tar xzv --strip 1 -C /usr/local/bin

# Create required directories
RUN mkdir -p /var/webhook /srv_root/docs /var/www/html/wiki

# Copy your scripts and config files
ADD update.sh /usr/local/bin/update.sh
COPY config/hooks.json /usr/local/bin/hooks.json
COPY config/apache2.conf /etc/apache2/apache2.conf
ADD start.sh /usr/local/bin/start.sh
RUN mkdir /var/www/html/wiki
ENTRYPOINT "start.sh"

# Ensure shell scripts are executable
RUN chmod +x /usr/local/bin/start.sh /usr/local/bin/update.sh

# Set container entrypoint
ENTRYPOINT ["/usr/local/bin/start.sh"]

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mkdocs-material==9.6.16
mkdocs-glightbox==0.4.0
mkdocs-glightbox==0.5.1
mkdocs==1.6.1
mkdocs-htmlproofer-plugin
pygments
Expand Down