Live Counter-Strike matches
-Click the icon next to a match to pin them for easier access, or check back later
diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..e2f4db1 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,11 @@ +venv/ +.venv/ +__pycache__/ +*.pyc +.git/ +tests/ +*.log +.env +config/ +/.vscode/ +*.log \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 8b5b41d..f52b850 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,36 @@ FROM python:3.13.14-alpine +RUN apk add --no-cache \ + build-base \ + libffi-dev \ + musl-dev \ + openssl-dev \ + python3-dev \ + geckodriver \ + firefox-esr + WORKDIR /app -COPY requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt && \ - apk add --no-cache firefox geckodriver - -COPY . . - ENV TOKEN="" -ENV URL="" ENV CONFIG_PATH="/config" -ENV COGS="" ENV GECKODRIVER_PATH="/usr/bin/geckodriver" -RUN mkdir ${CONFIG_PATH} +RUN adduser -D bot && \ + mkdir /logs && \ + chown -R bot:bot /logs && \ + chmod 755 /logs && \ + mkdir -p ${CONFIG_PATH} && \ + chown -R bot:bot ${CONFIG_PATH} && \ + chmod 755 ${CONFIG_PATH} + +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . +RUN chown -R bot:bot /app && \ + chmod -R 755 /app && \ + chmod +x /app/main.py + +USER bot ENTRYPOINT ["python", "main.py"] \ No newline at end of file diff --git a/compose.yaml b/compose.yaml index 02f519f..c1c3de5 100644 --- a/compose.yaml +++ b/compose.yaml @@ -6,15 +6,30 @@ networks: services: botmafieux: + build: + context: . + dockerfile: Dockerfile image: nebulo9/botmafieux:latest container_name: botmafieux restart: unless-stopped networks: - internal - outbound - env_file: ./.env + env_file: + - ./.env volumes: - ./config:/config + healthcheck: + test: ["CMD", "pgrep", "-f", "main.py"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 30s + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3" deploy: resources: limits: diff --git a/config/hltv.html b/config/hltv.html deleted file mode 100644 index fc7ae8e..0000000 --- a/config/hltv.html +++ /dev/null @@ -1,6778 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - -
Casters(37)
Streamers(15)
Organizers(8)
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
-