Skip to content

Commit

Permalink
Added corrections on docker-compose and added github checks file
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurvir committed Mar 24, 2024
1 parent 43a39f4 commit 59fc7d6
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 9 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Run linting and tests

on:
push:
branches-ignore:
- main
jobs:
test-lint:
name: Test
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up environment variables
run: |
echo "OPENAI_AI_KEY=${{secrets.OPENAI_AI_KEY}}" >> .env
echo "OPENAI_MODEL_ID=${{secrets.OPENAI_MODEL_ID}}" >> .env
echo "OPEN_AI_EMBEDDINGS_MODEL=${{secrets.OPEN_AI_EMBEDDINGS_MODEL}}" >> .env
echo "PORT=${{secrets.PORT}}" >> .env
echo "SERVER_PORT=${{secrets.SERVER_PORT}}" >> .env
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'

- name: Install dependencies
run: npm install

- name: Run linting
run: npm run docker:lint

- name: Run tests
run: npm run docker:test
17 changes: 8 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
version: '3.8'
services:
redis:
redis-session:
image: redis:latest
restart: always
container_name: redis
container_name: redis-session
ports:
- '6379:6379'
- '6380:6379'
volumes:
- redis_data:/data
networks:
- beckn_network
- beckn_action_bot_network

beckn-action-bot:
image: mayurvirendra/beckn-action-bot:latest
Expand All @@ -18,15 +18,14 @@ services:
build: .
env_file: ./.env
environment:
- REDIS_URL=redis://redis:6379
- REDIS_URL=redis://redis:6380
ports:
- '${PORT}:${PORT}'
- ${SERVER_PORT}:${SERVER_PORT}
depends_on:
- ${DB_HOST}
- redis
- redis-session
networks:
- beckn_network
- beckn_action_bot_network
# volumes:
# - ./:/app

Expand All @@ -39,4 +38,4 @@ volumes:
driver: local

networks:
beckn_network:
beckn_action_bot_network:

0 comments on commit 59fc7d6

Please sign in to comment.