Implement running Discord and 4chan gathering simultaneously
This commit is contained in:
23
docker/Dockerfile
Normal file
23
docker/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM python:3
|
||||
|
||||
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
|
||||
|
||||
RUN tar xf /code/discord-patched.tgz -C /venv/lib/python3.10/site-packages
|
||||
|
||||
CMD . /venv/bin/activate && exec python monolith.py
|
||||
BIN
docker/discord-patched.tgz
Normal file
BIN
docker/discord-patched.tgz
Normal file
Binary file not shown.
31
docker/docker-compose.prod.yml
Normal file
31
docker/docker-compose.prod.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
version: "2"
|
||||
|
||||
services:
|
||||
app:
|
||||
image: pathogen/monolith:latest
|
||||
build: ./docker
|
||||
volumes:
|
||||
- ${PORTAINER_GIT_DIR}:/code
|
||||
env_file:
|
||||
- .env
|
||||
volumes_from:
|
||||
- tmp
|
||||
|
||||
tmp:
|
||||
image: busybox
|
||||
command: chmod -R 777 /var/run/redis
|
||||
volumes:
|
||||
- /var/run/redis
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
command: redis-server /etc/redis.conf
|
||||
volumes:
|
||||
- ${PORTAINER_GIT_DIR}/docker/redis.conf:/etc/redis.conf
|
||||
volumes_from:
|
||||
- tmp
|
||||
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: pathogen
|
||||
2
docker/redis.conf
Normal file
2
docker/redis.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
unixsocket /var/run/redis/redis.sock
|
||||
unixsocketperm 777
|
||||
7
docker/requirements.txt
Normal file
7
docker/requirements.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
wheel
|
||||
treq
|
||||
beautifulsoup4
|
||||
redis
|
||||
siphashc
|
||||
aiohttp
|
||||
python-dotenv
|
||||
Reference in New Issue
Block a user