logboard/Dockerfile
Сергей Антропов 9d4add2a7d fix: resolve static files and import issues
- Fix static files not loading due to volume mount conflict
- Remove problematic volume mount from docker-compose.yml
- Add __init__.py files to make Python packages
- Fix all import statements to use relative imports
- Update start.sh to use correct module name
- Update config.py with correct default paths and values
- Ensure all environment variables are properly loaded from .env file
2025-08-20 18:14:35 +03:00

32 lines
889 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
COPY app/app.py /app/app.py
COPY app/excluded_containers.json /app/excluded_containers.json
COPY ./app/templates /app/templates
COPY ./app/static /app/static
COPY ./app/core /app/core
COPY ./app/api /app/api
COPY ./app/models /app/models
# Создаем пользователя и добавляем в группу docker
RUN useradd -m appuser && \
groupadd -g 999 docker || true && \
usermod -a -G docker appuser
# Создаем директорию для снимков
RUN mkdir -p /app/snapshots && chown -R appuser:appuser /app
# Скрипт для запуска с поддержкой DEBUG_MODE
COPY start.sh /app/start.sh
RUN chmod 755 /app/start.sh
EXPOSE 9001
CMD ["/app/start.sh"]