build-specific DBF

This commit is contained in:
AF 2023-08-24 19:34:30 +00:00
parent 110edfefc0
commit ade19acee8
3 changed files with 12 additions and 6 deletions

View File

@ -4,14 +4,14 @@ volumes:
services: services:
starbot: starbot:
build: starbot build:
context: starbot
target: ptvp35
volumes: volumes:
- "./starbot/starbot:/app/starbot:ro" - "./starbot/starbot:/app/starbot:ro"
- "stardata:/app/data/:rw" - "stardata:/app/data/:rw"
env_file: env_file:
- .secrets/starbot.env - .secrets/starbot.env
environment:
- DBF_MODULE=starbot.db_ptvp35
deploy: deploy:
resources: resources:
limits: limits:

View File

@ -1,6 +1,14 @@
FROM python:3.11 FROM python:3.11 as base
WORKDIR /app/ WORKDIR /app/
COPY requirements.txt requirements.txt COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt RUN pip install -r requirements.txt
COPY starbot starbot COPY starbot starbot
CMD ["python3", "-m", "starbot"] CMD ["python3", "-m", "starbot"]
FROM base as ptvp35
RUN pip install git+https://gitea.parrrate.ru/PTV/ptvp35.git@f8ee5d20f4e159df2e20c40dbf3b81e925c2db36
ENV DBF_MODULE=starbot.db_ptvp35
FROM base as sqlite
RUN pip install aiosqlite~=0.19
ENV DBF_MODULE=starbot.db_aiosqlite

View File

@ -1,4 +1,2 @@
aiohttp>=3.7.4,<4 aiohttp>=3.7.4,<4
aiosqlite~=0.19
discord.py~=2.3.2 discord.py~=2.3.2
ptvp35 @ git+https://gitea.parrrate.ru/PTV/ptvp35.git@f8ee5d20f4e159df2e20c40dbf3b81e925c2db36