diff --git a/Dockerfile-api b/Dockerfile-api new file mode 100644 index 0000000..a762408 --- /dev/null +++ b/Dockerfile-api @@ -0,0 +1,11 @@ +# Dockerfile-api +FROM python:3.9 + +WORKDIR /app + +COPY requirements-api.txt ./ +RUN pip install --no-cache-dir -r requirements-api.txt + +COPY api.py . + +CMD ["python", "./api.py"] \ No newline at end of file diff --git a/Dockerfile-bot b/Dockerfile-bot new file mode 100644 index 0000000..16380a0 --- /dev/null +++ b/Dockerfile-bot @@ -0,0 +1,11 @@ +# Dockerfile-science-bot +FROM python:3.9 + +WORKDIR /app + +COPY requirements-bot.txt ./ +RUN pip install --no-cache-dir -r requirements-science-bot.txt + +COPY science-bot.py . + +CMD ["python", "./science-bot.py"] \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index b2efef0..15eda5d 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,8 +3,8 @@ services: ipfs_host: image: ipfs/kubo:latest volumes: - - ./ipfs/staging/:/export - - ./ipfs/data:/data/ipfs + - /home/lio/ipfs/staging/:/export + - /home/lio/ipfs/data:/data/ipfs ports: - 4001:4001 - 4001:4001/udp @@ -17,4 +17,22 @@ services: ports: - 6333:6333 - 6334:6334 + restart: always + + science_bot: + build: + context: . + dockerfile: Dockerfile-science-bot + depends_on: + - api + + api: + build: + context: . + dockerfile: Dockerfile-api + ports: + - 6000:6000 + depends_on: + - ipfs_host + - qdrant restart: always \ No newline at end of file diff --git a/requirements-api.txt b/requirements-api.txt new file mode 100644 index 0000000..0c05449 --- /dev/null +++ b/requirements-api.txt @@ -0,0 +1,2 @@ +cybrex +quart \ No newline at end of file diff --git a/requirements-bot.txt b/requirements-bot.txt new file mode 100644 index 0000000..f1e3cd8 --- /dev/null +++ b/requirements-bot.txt @@ -0,0 +1,3 @@ +nostr_sdk +cybrex +quart \ No newline at end of file