diff --git a/README.md b/README.md index 03d904b..dc44965 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ This is the API for music room service in InNoHassle ecosystem. 1. Install dependencies for api if needed: ```bash - poetry install --with api + poetry install ``` 2. Run the database if you have not done it yet 3. Upgrade the database schema using [alembic](https://alembic.sqlalchemy.org/en/latest/): @@ -120,7 +120,7 @@ Now the API is running on http://localhost:8001. Good job! 1. Install dependencies for bot if needed: ```bash - poetry install --with bot + poetry install ``` 2. Run the [API service](#run-for-development-api) or configure the bot to work with the real(production) API. 3. Run the Redis server if needed: diff --git a/api.Dockerfile b/api.Dockerfile index 70bba73..a2b9353 100644 --- a/api.Dockerfile +++ b/api.Dockerfile @@ -39,7 +39,7 @@ RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=${POETRY_HOME} pyt # and install only runtime deps using poetry WORKDIR $PYSETUP_PATH COPY ./poetry.lock ./pyproject.toml ./ -RUN poetry install --with api +RUN poetry install ########################################################### @@ -48,8 +48,7 @@ FROM base AS production COPY --from=builder $VENV_PATH $VENV_PATH -COPY ./deploy/docker-entrypoint-alembic.sh /docker-entrypoint.sh -RUN chmod +x /docker-entrypoint.sh +COPY --chmod=755 ./deploy/docker-entrypoint.sh ./deploy/docker-entrypoint-alembic.sh / # Create user with the name poetry RUN groupadd -g 1500 poetry && \ @@ -60,5 +59,5 @@ USER poetry WORKDIR /code EXPOSE 8000 -ENTRYPOINT [ "/docker-entrypoint.sh" ] +ENTRYPOINT [ "/docker-entrypoint-alembic.sh" ] CMD [ "uvicorn", "src.api.app:app", "--host", "0.0.0.0", "--port", "8000", "--proxy-headers", "--forwarded-allow-ips=*" ] diff --git a/bot.Dockerfile b/bot.Dockerfile index 54abf14..acb9e59 100644 --- a/bot.Dockerfile +++ b/bot.Dockerfile @@ -39,7 +39,7 @@ RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=${POETRY_HOME} pyt # and install only runtime deps using poetry WORKDIR $PYSETUP_PATH COPY ./poetry.lock ./pyproject.toml ./ -RUN poetry install --with bot +RUN poetry install ########################################################### @@ -48,8 +48,7 @@ FROM base AS production COPY --from=builder $VENV_PATH $VENV_PATH -COPY ./deploy/docker-entrypoint.sh /docker-entrypoint.sh -RUN chmod +x /docker-entrypoint.sh +COPY --chmod=755 ./deploy/docker-entrypoint.sh ./deploy/docker-entrypoint-alembic.sh / # Create user with the name poetry RUN groupadd -g 1500 poetry && \ diff --git a/poetry.lock b/poetry.lock index 5e69586..d695320 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1970,4 +1970,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "4d58ea2cb15e8c9c1c6477dcbd24d1b4112fd9e4c3161e7acea477b77804837c" +content-hash = "99ca387a154420f6c4b8ebf142485059969c50dc66e9247d3612cfb8853f1e37" diff --git a/pyproject.toml b/pyproject.toml index a45bede..c570eb2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,8 +12,6 @@ colorlog = "^6.8.2" pre-commit = "^3.6.2" pyyaml = "^6.0.1" ruff = "^0.6.8" - -[tool.poetry.group.api.dependencies] alembic = "^1.13.3" asyncpg = "^0.29.0" authlib = "^1.3.0" @@ -26,8 +24,6 @@ pydantic = { version = "<2.10", extras = ["email"] } # TODO: Update when aiogram python-docx = "^1.1.0" sqlalchemy = "^2.0.23" uvicorn = "^0.31.0" - -[tool.poetry.group.bot.dependencies] aiogram = "^3.4.1" aiogram-dialog = "^2.2.0" aiohttp = "^3.9.3"