Skip to content

Commit

Permalink
Merge pull request #22 from andy-takker/develop
Browse files Browse the repository at this point in the history
Release v1.0.2
  • Loading branch information
andy-takker authored Jan 4, 2024
2 parents d7a2b22 + 2d37b5a commit 47d7929
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ COPY /start.sh /app/
RUN chmod +x /app/start.sh /wait-for-it.sh

COPY ./idb /app/idb
COPY ./inutils /app/inutils

ENV PYTHONPATH=/app
10 changes: 5 additions & 5 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: '3.8'
services:
db:
postgres:
image: postgres:15
restart: unless-stopped
environment:
Expand All @@ -15,17 +15,17 @@ services:
redis:
image: redis
restart: unless-stopped
command: redis-server --requirepass $REDIS_PASSWORD

bot:
image: andytakker/inclusive_dance_bot:latest
restart: unless-stopped
command: /wait-for-it.sh -t 15 -h db -p 5432 -- /app/start.sh
command: /wait-for-it.sh -t 15 -h postgres -p 5432 -- /app/start.sh
environment:
APP_REDIS_DSN: redis://:$REDIS_PASSWORD@redis:6379/1
APP_REDIS_DSN: redis://redis:6379/1
APP_PG_DSN: postgresql+asyncpg://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres:5432/$POSTGRES_DB

APP_TELEGRAM_BOT_TOKEN: $TELEGRAM_BOT_TOKEN
APP_TELEGRAM_BOT_TOKEN: $APP_TELEGRAM_BOT_TOKEN
APP_TELEGRAM_BOT_ADMIN_IDS: $APP_TELEGRAM_BOT_ADMIN_IDS

volumes:
postgres_data:
Expand Down
2 changes: 1 addition & 1 deletion idb/bot/dialogs/admins/manage_admins/read/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async def on_click(
hide_on_single_page=True,
),
Start(
text=Const("Добавить администратора"),
text=Const("💻 Назначить администратора"),
id="add_admin",
state=AddAdminSG.input_username,
),
Expand Down
2 changes: 1 addition & 1 deletion idb/bot/dialogs/admins/submenu/read/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async def open_submenu(
on_page_changed=sync_scroll(SCROLL_MESSAGE_ID),
),
Start(
text=Const("Добавить подменю"),
text=Const("🆕 Добавить подменю"),
id="create_submenu",
state=CreateSubmenuSG.type,
),
Expand Down
2 changes: 1 addition & 1 deletion idb/bot/dialogs/admins/url/read/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def open_url(
on_page_changed=sync_scroll(SCROLL_MESSAGE_ID),
),
Start(
text=Const("Добавить ссылку"),
text=Const("🆕 Добавить ссылку"),
id="create_url",
state=CreateUrlSG.slug,
),
Expand Down
1 change: 0 additions & 1 deletion idb/db/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def main() -> None:
default=os.getenv("APP_PG_DSN", DEFAULT_PG_DSN),
help="Database URL [env var: APP_PG_DSN]",
)

options = alembic.parser.parse_args()
if "cmd" not in options:
alembic.parser.error("too few arguments")
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ aiomisc-dependency = "^0.1.20"
aiomisc-pytest = "^1.1.1"
configargparse = "^1.7"
ujson = "^5.9.0"
pyyaml = "^6.0.1"

[tool.poetry.group.dev.dependencies]
mypy = "^1.5.1"
Expand Down
6 changes: 4 additions & 2 deletions start.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#! /usr/bin/env bash
python -m idb.db --pg-url $PG_URL upgrade head
set -e

python /app/idb/init_data.py
python -m idb.db upgrade head

python /app/inutils/init_data.py --init-data-path=/app/inutils/init_data.yaml

python -m idb

0 comments on commit 47d7929

Please sign in to comment.