File size: 1,062 Bytes
ddecc13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM python:3.12-slim-bookworm

# Create app user and directory
RUN useradd -m appuser && \
    mkdir /app && \
    chown appuser:appuser /app

WORKDIR /app

# Install build dependencies and git, clone repo (keeping build dependencies)
RUN apt-get update && \
    apt-get install -y --no-install-recommends git gcc python3-dev && \
    git clone https://github.com/SeoulDroid99100/MangaBot/ . && \
    rm -rf /var/lib/apt/lists/*

# Switch to appuser and set up virtual environment
USER appuser
RUN python -m venv venv
ENV PATH="/app/venv/bin:$PATH"

# Create log directory with write permissions
USER root
RUN mkdir -p /app/logs && chmod 777 /app/logs
USER appuser

ENV API_ID="28213805"
ENV API_HASH="8f80142dfef1a696bee7f6ab4f6ece34"
ENV BOT_TOKEN="7858075187:AAFiMtVOdseEqkCkKYh2JWmPe8DkEY5wYC8"
ENV DATABASE_URL_PRIMARY="sqlite:////app/data/data.db"
ENV CACHE_CHANNEL="drunkCache0"
ENV CHANNEL="drunkCache0"
ENV FNAME=""
ENV THUMB=""
ENV LOG_LEVEL="INFO"
RUN pip install -r requirements.txt
EXPOSE 7860
 #Sex test
# Run from module
CMD ["python3","main.py"]