Skip to content

Commit

Permalink
health check and backend_dev shell script for AWS instance
Browse files Browse the repository at this point in the history
  • Loading branch information
arastasci committed Nov 22, 2024
1 parent d5daed9 commit 374303d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
8 changes: 8 additions & 0 deletions backend_dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set -e
docker-compose -f docker-compose-dev-backend.yml down --volumes
sudo rm -rf dbdata
cd backend/app
sudo rm -rf migrations
cd ../../
sudo git pull
sudo docker-compose -f docker-compose-dev-backend.yml up --build
11 changes: 8 additions & 3 deletions docker-compose-dev-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ services:
- ./dbdata:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U halil -d db"]
interval: 5s
timeout: 10s
retries: 5

web:
build: ./backend
Expand All @@ -22,7 +27,7 @@ services:
env_file:
- .env
depends_on:
- db

db:
condition: service_healthy
volumes:
dbdata:
dbdata:

0 comments on commit 374303d

Please sign in to comment.