Update to run with Podman

This commit is contained in:
2024-12-29 17:35:57 +00:00
parent 5ea4e5f460
commit 054e9caca0
11 changed files with 557 additions and 239 deletions

View File

@@ -1,24 +0,0 @@
# syntax=docker/dockerfile:1
FROM python:3.10
RUN useradd -d /code pathogen
RUN mkdir /code
RUN chown pathogen:pathogen /code
RUN mkdir /venv
RUN chown pathogen:pathogen /venv
USER pathogen
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /code
COPY requirements.txt /code/
COPY discord-patched.tgz /code/
RUN python -m venv /venv
RUN . /venv/bin/activate && pip install -r requirements.txt
# && python -m spacy download en_core_web_sm
RUN tar xf /code/discord-patched.tgz -C /venv/lib/python3.10/site-packages
CMD . /venv/bin/activate && exec python monolith.py

View File

@@ -1,87 +0,0 @@
version: "2.2"
services:
app:
image: pathogen/monolith:latest
container_name: monolith
build: ${PORTAINER_GIT_DIR}/docker
volumes:
- ${PORTAINER_GIT_DIR}:/code
env_file:
- ../stack.env
networks:
- default
- pathogen
- elastic
threshold:
image: pathogen/threshold:latest
container_name: threshold
build: ../legacy/docker
volumes:
- ${PORTAINER_GIT_DIR}:/code
- ${THRESHOLD_CONFIG_DIR}:/code/legacy/conf/live
#- ${THRESHOLD_TEMPLATE_DIR}:/code/conf/templates
- ${THRESHOLD_CERT_DIR}:/code/legacy/conf/cert
volumes_from:
- tmp
ports:
- "${THRESHOLD_LISTENER_PORT}:${THRESHOLD_LISTENER_PORT}"
- "${THRESHOLD_RELAY_PORT}:${THRESHOLD_RELAY_PORT}"
- "${THRESHOLD_API_PORT}:${THRESHOLD_API_PORT}"
env_file:
- ../stack.env
# for development
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- default
- pathogen
ssdb:
image: tsl0922/ssdb
container_name: ssdb_monolith
ports:
- "1289:1289"
environment:
- SSDB_PORT=1289
networks:
- default
tmp:
image: busybox
container_name: tmp_monolith
command: chmod -R 777 /var/run/socks
volumes:
- /var/run/socks
redis:
image: redis
container_name: redis_monolith
command: redis-server /etc/redis.conf
ulimits:
nproc: 65535
nofile:
soft: 65535
hard: 65535
volumes:
- ${PORTAINER_GIT_DIR}/docker/redis.conf:/etc/redis.conf
- redis_data:/data
volumes_from:
- tmp
healthcheck:
test: "redis-cli -s /var/run/socks/redis.sock ping"
interval: 2s
timeout: 2s
retries: 15
networks:
default:
driver: bridge
pathogen:
external: true
elastic:
external: true
volumes:
redis_data:

View File

@@ -1,2 +1,4 @@
unixsocket /var/run/socks/redis.sock
unixsocketperm 777
# unixsocket /var/run/socks/redis.sock
# unixsocketperm 777
port 6379
requirepass changeme

View File

@@ -1,24 +0,0 @@
wheel
beautifulsoup4
redis
siphashc
aiohttp[speedups]
python-dotenv
#manticoresearch
numpy
aioredis[hiredis]
#aiokafka
vaderSentiment
polyglot
pyicu
pycld2
morfessor
six
nltk
#spacy
gensim
python-Levenshtein
orjson
uvloop
elasticsearch[async]
msgpack