Skip to content

Commit

Permalink
Merge pull request #538 from intuitem/477_race_condition_improvement
Browse files Browse the repository at this point in the history
Give the database time to finish migration
  • Loading branch information
ab-smith authored Jun 10, 2024
2 parents b6f31a1 + 6b6f1b7 commit 7c02ae3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ if [ -f db/ciso-assistant.sqlite3 ] ; then
else
docker rmi ghcr.io/intuitem/ciso-assistant-community/backend:latest ghcr.io/intuitem/ciso-assistant-community/frontend:latest 2> /dev/null
docker compose up -d
docker compose exec backend python manage.py migrate
echo "Giving sometime for the database to be ready, please wait ..."
sleep 20
echo "initialize your superuser account..."
docker compose exec backend python manage.py createsuperuser
echo "connect to ciso assistant on https://localhost:8443"
Expand Down
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ services:
caddy:
container_name: caddy
image: caddy:2.7.6
depends_on:
- frontend
restart: unless-stopped
ports:
- 8443:8443
Expand All @@ -38,4 +40,4 @@ services:
- --to
- frontend:3000
volumes:
- ./db:/data
- ./caddy_data:/data

0 comments on commit 7c02ae3

Please sign in to comment.