bmc_hub/Dockerfile
Christian 30d1be61eb feat: Add global search functionality and email results section
- Introduced a global search button and modal for enhanced user experience.
- Added a new section for displaying email results in the global search modal.
- Implemented functionality to fetch and display emails based on user queries.
- Updated the UI to include a reminders button and improved accessibility features.

fix: Update docker-compose to allow reload configuration

- Changed ENABLE_RELOAD environment variable to default to true for easier development.

chore: Update requirements for new dependencies

- Added brother_ql, pyzbar, and pypdfium2 to requirements for label printing and PDF processing.

feat: Implement Brother label printing service

- Created a new service for printing labels using Brother QL printers.
- Supports direct printing of case hardware labels with customizable layouts.

feat: Add Vaultwarden service for credential management

- Implemented a service to interact with Vaultwarden for secure credential storage and retrieval.

sql: Add migrations for email thread keys and document tokens

- Created migrations to backfill email thread keys and manage document tokens for work orders.
- Introduced new tables and updated existing structures to support token-based linking of scanned documents.

sql: Import links into the database

- Added a script to import a predefined set of links into the database with associated categories.
2026-04-01 21:34:58 +02:00

67 lines
2.0 KiB
Docker

FROM python:3.13-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
git \
libpq-dev \
libzbar0 \
gcc \
g++ \
python3-dev \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*
# Build arguments for GitHub release deployment
ARG RELEASE_VERSION=latest
ARG GITHUB_TOKEN
ARG GITHUB_REPO=ct/bmc_hub
ARG GITEA_URL=https://g.bmcnetworks.dk
# Copy requirements first for better caching
COPY requirements.txt /tmp/requirements.txt
# If RELEASE_VERSION is set and not "latest", pull from GitHub release
# Otherwise, use local requirements
RUN if [ "$RELEASE_VERSION" != "latest" ] && [ -n "$GITHUB_TOKEN" ]; then \
echo "Downloading release ${RELEASE_VERSION} from Gitea..." && \
curl -H "Authorization: token ${GITHUB_TOKEN}" \
-L "${GITEA_URL}/api/v1/repos/${GITHUB_REPO}/archive/${RELEASE_VERSION}.tar.gz" \
-o /tmp/release.tar.gz && \
tar -xzf /tmp/release.tar.gz --strip-components=1 -C /app && \
rm /tmp/release.tar.gz && \
echo "Installing dependencies from release..." && \
pip install --no-cache-dir -r requirements.txt; \
else \
echo "Using local files..." && \
pip install --no-cache-dir -r /tmp/requirements.txt; \
fi
# Copy local source to temp location.
# In release builds we keep downloaded source in /app.
# In latest/local builds we copy from /app_local to /app.
COPY . /app_local
RUN if [ "$RELEASE_VERSION" = "latest" ] || [ -z "$GITHUB_TOKEN" ]; then \
echo "Using local source files..." && \
cp -a /app_local/. /app/; \
else \
echo "Keeping downloaded release source in /app (no local override)"; \
fi && \
rm -rf /app_local
# Create necessary directories
RUN mkdir -p /app/logs /app/uploads /app/static /app/data
# Expose port
EXPOSE 8000
# Health check
HEALTHCHECK --interval=30s --timeout=10s --retries=3 --start-period=40s \
CMD curl -f http://localhost:8000/health || exit 1
# Run application
CMD ["python", "main.py"]