diff --git a/.gitea/workflows/docker-pull.yml b/.gitea/workflows/docker-pull.yml new file mode 100644 index 0000000..1bcbca1 --- /dev/null +++ b/.gitea/workflows/docker-pull.yml @@ -0,0 +1,37 @@ +name: Build and Push Docker Image +run-name: Building Docker image 🚀 + +on: + push: + branches: + - main + +jobs: + build-and-push: + if: contains(github.event.head_commit.message, 'release') + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + push: true + tags: | + itqop/hubgw:latest + itqop/hubgw:${{ gitea.sha }} + cache-from: type=registry,ref=itqop/hubgw:buildcache + cache-to: type=registry,ref=itqop/hubgw:buildcache,mode=max diff --git a/docker-compose.yml b/docker-compose.yml index 20ec09e..c6db05e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,8 +5,25 @@ services: - "8087:8080" environment: - PYTHONPATH=/app/src + + - APP__ENV=prod + - APP__HOST=0.0.0.0 + - APP__PORT=8080 + - APP__LOG_LEVEL=INFO + + - DATABASE__HOST=localhost + - DATABASE__PORT=5432 + - DATABASE__USER=hubgw_user + - DATABASE__PASSWORD=your_secure_password + - DATABASE__DATABASE=hubgw + - DATABASE__AZURIOM_DATABASE=azuriom + - DATABASE__POOL_SIZE=10 + - DATABASE__MAX_OVERFLOW=10 + - DATABASE__ECHO=false + + - SECURITY__API_KEY=your_very_secure_api_key_here + - SECURITY__RATE_LIMIT_PER_MIN=100 volumes: - # Монтируем логи если нужно - ./logs:/app/logs restart: unless-stopped healthcheck: