Skip to content

Commit

Permalink
Merge pull request #4 from devadathanmb/rework/notiy-user
Browse files Browse the repository at this point in the history
Rework notification broadcast feature
  • Loading branch information
devadathanmb authored Jan 29, 2024
2 parents 69b71b0 + 5fdc2b0 commit a66eb03
Show file tree
Hide file tree
Showing 7 changed files with 412 additions and 146 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,10 @@ jobs:
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/ktu-bot:${{ github.sha }} ktu-bot:latest
docker logs ktu-bot >> ~/bot.log || true
docker stop ktu-bot || true
docker stop redis-queue-db || true
docker rm ktu-bot || true
docker run -d --restart always -p 5000:5000 -e TZ=Asia/Kolkata -e ENV_TYPE=${{ secrets.ENV_TYPE }} -e ADMIN_ID=${{ secrets.ADMIN_ID }} -e WEBHOOK_DOMAIN=${{ secrets.WEBHOOK_DOMAIN }} -e WEBHOOK_PORT=${{ secrets.WEBHOOK_PORT }} -e BOT_TOKEN=${{ secrets.BOT_TOKEN }} -e FIREBASE_SERVICE_ACCOUNT="${{ secrets.FIREBASE_SERVICE_ACCOUNT }}" --name ktu-bot ktu-bot:latest
docker rm redis-queue-db || true
docker network rm ktu-bot-network || true
docker network create ktu-bot-network || true
docker run -d --restart always -p 6379:6379 --network ktu-bot --network-alias redis-queue-db --name redis-db redis
docker run -d --restart always -p 5000:5000 -e TZ=Asia/Kolkata --network ktu-bot -e ENV_TYPE=${{ secrets.ENV_TYPE }} -e ADMIN_ID=${{ secrets.ADMIN_ID }} -e WEBHOOK_DOMAIN=${{ secrets.WEBHOOK_DOMAIN }} -e WEBHOOK_PORT=${{ secrets.WEBHOOK_PORT }} -e BOT_TOKEN=${{ secrets.BOT_TOKEN }} -e FIREBASE_SERVICE_ACCOUNT="${{ secrets.FIREBASE_SERVICE_ACCOUNT }}" --name ktu-bot ktu-bot:latest
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,15 @@ services:
ktu-bot:
build: .
restart: always
depends_on:
redis-queue-db:
condition: service_healthy

redis-queue-db:
image: redis
restart: always
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
Loading

0 comments on commit a66eb03

Please sign in to comment.