From c2125e6736a62b8c4e5fbb7788bfd165f6917a99 Mon Sep 17 00:00:00 2001 From: stakost Date: Sun, 1 Jun 2025 12:13:13 +0300 Subject: [PATCH] Fix async init_db and HTTP registry config --- .gitea/workflows/ci-cd.yml | 6 +++++- Dockerfile | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci-cd.yml b/.gitea/workflows/ci-cd.yml index d7e693c..9c1463f 100644 --- a/.gitea/workflows/ci-cd.yml +++ b/.gitea/workflows/ci-cd.yml @@ -16,6 +16,11 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + with: + config-inline: | + [registry."10.10.30.121:5000"] + http = true + insecure = true - name: Build and push Docker image uses: docker/build-push-action@v4 @@ -24,7 +29,6 @@ jobs: file: ./Dockerfile push: true tags: 10.10.30.121:5000/mikrotik-bot:latest - insecure: true - name: Deploy to production run: | diff --git a/Dockerfile b/Dockerfile index af6c714..a8213d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,7 @@ RUN pip install --no-cache-dir -r requirements.txt COPY . . -RUN python -c "import db; db.init_db()" +# Убираем автоматическую инициализацию БД - она будет создана при первом запуске +# RUN python -c "import db; db.init_db()" CMD ["python", "bot.py"] \ No newline at end of file