Automate database migrations in deployment
This commit is contained in:
@@ -62,6 +62,9 @@ ssh $SERVER_USER@$SERVER_IP << EOF
|
||||
|
||||
echo "🏗️ Rebuilding and starting production containers using \$DOCKER_CMD..."
|
||||
\$DOCKER_CMD up -d --build
|
||||
|
||||
echo "🗄️ Running database migrations..."
|
||||
\$DOCKER_CMD exec -T api npm run migration:run:prod
|
||||
else
|
||||
echo "❌ Error: docker-compose.yml not found!"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user