fix: make deploy script robust
This commit is contained in:
@@ -17,7 +17,8 @@ fi
|
|||||||
|
|
||||||
# 3. Setup extensions
|
# 3. Setup extensions
|
||||||
echo "Enabling extensions..."
|
echo "Enabling extensions..."
|
||||||
docker exec dagi-postgres psql -U postgres -d daarion_memory -c 'CREATE EXTENSION IF NOT EXISTS "uuid-ossp";'
|
docker exec dagi-postgres psql -U postgres -d daarion_memory -c 'CREATE EXTENSION IF NOT EXISTS "uuid-ossp";' || echo "Warning: Could not enable uuid-ossp"
|
||||||
|
docker exec dagi-postgres psql -U postgres -d daarion_memory -c 'CREATE EXTENSION IF NOT EXISTS "pgcrypto";' || echo "Warning: Could not enable pgcrypto"
|
||||||
|
|
||||||
# 4. Apply all migrations in order
|
# 4. Apply all migrations in order
|
||||||
echo "Applying migrations..."
|
echo "Applying migrations..."
|
||||||
@@ -28,7 +29,11 @@ done
|
|||||||
|
|
||||||
# 5. Rebuild and restart city-service
|
# 5. Rebuild and restart city-service
|
||||||
echo "Restarting city-service..."
|
echo "Restarting city-service..."
|
||||||
docker compose up -d --build city-service
|
if command -v docker-compose &> /dev/null; then
|
||||||
|
docker-compose up -d --build city-service
|
||||||
|
else
|
||||||
|
docker compose up -d --build city-service
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Deployment and DB restoration complete!"
|
echo "Deployment and DB restoration complete!"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user